Download the PHP package ronvanderheijden/openid-connect without Composer
On this page you can find all versions of the php package ronvanderheijden/openid-connect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ronvanderheijden/openid-connect
More information about ronvanderheijden/openid-connect
Files in ronvanderheijden/openid-connect
Package openid-connect
Short Description OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.
License MIT
Homepage https://github.com/ronvanderheijden/openid-connect
Informations about the package openid-connect
OpenID Connect
OpenID Connect support to the PHP League's OAuth2 Server.
Compatible with Laravel Passport!
Requirements
- Requires PHP version
^7.4|^8.0
. - lcobucci/jwt version
^4.0
. - league/oauth2-server
^8.2
.
Installation
Keys
To sign and encrypt the tokens, we need a private and a public key.
Example
I recommand to read this first.
To enable OpenID Connect, follow these simple steps
Now when calling the /authorize
endpoint, provide the openid
scope to get an id_token
.
Provide more scopes (e.g. openid profile email
) to receive additional claims in the id_token
.
For a complete implementation, visit the OAuth2 Server example.
Laravel Passport
You can use this package with Laravel Passport in 2 simple steps.
1.) add the service provider
2.) create an entity
Create an entity class in app/Entities/
named IdentityEntity
or UserEntity
. This entity is used to collect the claims.
Publishing the config
In case you want to change the default scopes, add custom claim sets or change the repositories, you can publish the openid config using:
Support
Found a bug? Got a feature request? Create an issue.
License
OpenID Connect is open source and licensed under the MIT licence.