A Laravel wrapper of jumbojett's OpenID Connect Client
coddin-web/oidc-client-laravel-wrapper is a Laravel package for a laravel wrapper of jumbojett's openid connect client.
It currently has 2 GitHub stars and 1.492 downloads on Packagist (latest version 1.5.0).
Install it with composer require coddin-web/oidc-client-laravel-wrapper.
Discover more Laravel packages by coddin-web
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel wrapper of jumbojett's OpenID Connect Client (jumbojett/openid-connect-php).
This package will set up a Middleware group that can be used to protect web routes with OpenID Connect verification and api routes with token verification.
A few things are necessary to make this library work:
When this package is done verifying the token is legit an Event will be fired to be consumed by the target application.
This event should e.g. perform Auth::login($user) to fully let Laravel know this package has handled the authorization.
The UserAuthorizedEvent will broadcast a userUuid, userName and userEmail, your application should already know the user by one of these values (preferably the UUID).
Logging out (also the IDP) is not fully implemented yet. To do it "locally" the only thing needed is to kill the session.
You can set up an IDP with laravel/passport or set up your own with e.g. a Symfony application in combination with
steverhoades/oauth2-openid-connect-server
Or better yet use our IDP package which is a ready to use Symfony bundle with a clear and concise readme and with the above-mentioned library fully implemented. OpenIDConnect IDP Symfony bundle