Download the PHP package thomasvargiu/php-openid-client without Composer

On this page you can find all versions of the php package thomasvargiu/php-openid-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 php-openid-client

php-openid-client

Full OpenID client implementation.

Latest Stable Version Total Downloads License Code Coverage Build Status Scrutinizer Code Quality

Most of the library code is based on the awesome node-openid-client.

Implemented specs and features

Supports of the following draft specifications

Installation

Requirements:

RSA signing algorithms are already included from the JWT Framework package`. If you need other algorithms you should install it manually.

Basic Usage

For a basic usage you shouldn't require any other dependency package.

Dependencies and complex usage

Some classes require dependencies. Usually they are automatically instanced for a simple basic usage, but you can inject them when necessary.

PSR-17 HTTP factories are automatically discovered. PSR-18 HTTP client is automatically discovered, but I suggest to always inject your client, specially when discovering the provider configuration and JWK Set and cache the result.

If you need other algorithms, you should create an AlgorithmManager with your algorithms and inject it when needed.

Example how to create a complete configured instance of the AuthorizationService:

`

Client registration

Token Introspection

Token Revocation

Request Object

You can create a request object authorization request with the TMV\OpenIdClient\RequestObject\RequestObjectFactory class.

This will create a signed (and optionally encrypted) JWT token based on your client metadata.

Then you can use it to create the AuthRequest:

Aggregated and Distributed Claims

The library can handle aggregated and distributed claims:

`

Using middlewares

There are some middlewares and handles available:

SessionCookieMiddleware

This middleware should always be on top of middlewares chain to provide a cookie session for state and nonce parameters.

To use it you should install the dflydev/fig-cookies package:

The middleware provides a TMV\OpenIdClient\Session\AuthSessionInterface attribute with an TMV\OpenIdClient\Session\AuthSessionInterface stateful instance used to persist session data.

Using another session storage

If you have another session storage, you can handle it and provide a TMV\OpenIdClient\Session\AuthSessionInterface instance in the TMV\OpenIdClient\Session\AuthSessionInterface attribute.

ClientProviderMiddleware

This middleware should always be on top of middlewares chain to provide the client to the other middlewares.

AuthRequestProviderMiddleware

This middleware provide the auth request to use with the AuthRedirectHandler.

AuthRedirectHandler

This handler will redirect the user to the OpenID authorization page.

CallbackMiddleware

This middleware will handle the callback from the OpenID provider.

It will provide a TMV\OpenIdClient\Token\TokenSetInterface attribute with the final TokenSet object.

UserinfoMiddleware

This middleware will fetch user data from the userinfo endpoint and will provide an TMV\OpenIdClient\Middleware\UserInfoMiddleware attribute with user infos as array.


All versions of php-openid-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
ext-json Version *
php-http/discovery Version ^1.6
psr/http-client Version ^1.0
psr/http-client-implementation Version ^1.0
psr/http-factory Version ^1.0
psr/http-factory-implementation Version ^1.0
psr/http-message Version ^1.0
psr/http-message-implementation Version ^1.0
psr/http-server-middleware Version ^1.0
web-token/jwt-checker Version ^2.0
web-token/jwt-core Version ^2.0
web-token/jwt-encryption Version ^2.0
web-token/jwt-key-mgmt Version ^2.0.7
web-token/jwt-signature Version ^2.0
web-token/jwt-signature-algorithm-rsa Version ^2.0
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 thomasvargiu/php-openid-client contains the following files

Loading the files please wait ....