Download the PHP package mapkyca/known-oauth2-server without Composer

On this page you can find all versions of the php package mapkyca/known-oauth2-server. 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 known-oauth2-server

OAuth2 Server for Known

EXPERIMENTAL

This plugin provides an OAuth2 Server for Known, allowing users to create applications and allow clients to authenticate themselves for the API and website using an OAuth2 access token.

This plugin is an experimental basic implementation of the spec, so please, kick it around and report any issues you find!

Usage

Support

Currently the plugin supports:

Example usage

To get a code:

You will be bounced to a login + authorisation page if necessary, so follow forwards.

As per the spec, you can omit the , in which case the response will be a straight json encoded blob. If is specified you will be forwarded to the endpoint, with appropriate parameters in the GET fields.

To get a token:

You should get back a json encoded blob with an access token, expiry and refresh token.

To refresh a token:

If your access token has expired, you can update it with the refresh token.

Success will spit back a new access token, refresh token and expiry. It also results in the destruction of the original token.

Accessing the token

On a successful login the token used will be saved to the current session in , you can use this to check scope permissions, application ID and other details.

The scope granted to a given user is also saved against the user object in an array , which is also cross checked on login.

Why not use native signed HTTP?

Natively, Known uses a per-user api key to sign requests, so why not use this?

Of course you can still, and the OAuth2 server doesn't replace that option. In many ways the signed HTTP approach is easier to get going, however...

1) There are many existing libraries for OAuth2 in pretty much every language. 2) With OAuth2 you give different credentials to each application. This means that if you no longer want to allow access from application A, but still want to keep B and C, you can revoke A's tokens specifically.

OpenID Connect

If you include the scope openid, on success the server will return an OpenID Connect signed JWT in the id_token field.

This token will include basic information about the authenticated user. If you also ask for email and profile scopes as well, you'll get some extra profile information back (email, full name, picture url, username, etc).

You can verify this token against the public key for the application (available from https://yourserver.com/oauth2/CLIENTID/key)

See


All versions of known-oauth2-server with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
firebase/php-jwt Version ^5.2
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 mapkyca/known-oauth2-server contains the following files

Loading the files please wait ....