Download the PHP package indielogin/client without Composer

On this page you can find all versions of the php package indielogin/client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package client

IndieLogin Client

This is a helper library to use with services like IndieLogin.com. That service provides an API that works very similar to the IndieAuth protocol, but can authenticate users with a number of different methods, including IndieAuth, email, PGP keys, GitHub and Twitter.

When users log in with this library, it will first check their website for an authorization endpoint and do an IndieAuth flow directly if found. Otherwise, it will redirect them to the configured server to authenticate there.

Usage

Create a Login Form

You'll first need to create a login form to prompt the user to enter their website address. This might look something like the HTML below.

Begin the Login Flow

In the login.php file, you'll need to initialize the session, and tell this library to discover the user's endpoints. If everything succeeds, the library will return a URL that you can use to redirect the user to begin the flow.

The example below will have some really basic error handling, which you'll probably want to replace with something nicer looking.

Example login.php file:

The following scopes have special meaning to the authorization server and will request the user's full profile info instead of just verifying their profile URL:

Handling the Redirect

In your redirect file, you just need to pass all the query string parameters to the library and it will take care of things! It will use the authorization or token endpoint it found in the initial step, and will use the authorization code to verify the profile information.

The result will be the response from the authorization endpoint, which will contain the user's final me URL as well as profile info if you requested one or more scopes.

If there were any problems, the error information will be returned to you as well.

The library takes care of verifying the final returned profile URL has the same authorization endpoint as the entered URL.

Example redirect.php file:

License

Copyright 2013-2020 by Aaron Parecki and contributors

Available under the MIT and Apache 2.0 licenses. See LICENSE.txt


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >7.2.0
indieauth/client Version ^1.1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package indielogin/client contains the following files

Loading the files please wait ....