Download the PHP package holadev/oauth2-loginradius without Composer
On this page you can find all versions of the php package holadev/oauth2-loginradius. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download holadev/oauth2-loginradius
More information about holadev/oauth2-loginradius
Files in holadev/oauth2-loginradius
Package oauth2-loginradius
Short Description LoginRadius OAuth 2.0 Client Provider for The knpuniversity/oauth2-client-bundle
License MIT
Informations about the package oauth2-loginradius
LoginRadius Provider for OAuth 2.0 Client
This package provides LoginRadius OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
Usage
Activate the bundle in the bundles.php file
Create a knpu_oauth2_client.yaml file inside config/packages directory like this:
Define your firewall in the config/packages/security.yaml file:
Add this interfaces to your User entity:
Your user provider must implement the interface UseLoaderInterface, like this:
The OauthUserInterface allows the system to save the AccessToken of the user to check the this token is valid in each request.
Create a controller with to routes: connect_loginradius_start and connect_loginradius_check :
LoginRadius AccessToken check
If you use Oauth2 in various systems, you don't want if you logout of one system your session in the others continues.
To solve this problem we implement an AuthenticationVoter that takes your session accessToken and validates. If the token is invalid you need to login again.
To activate this voter put in the config/packages/security.yaml
LoginRadius Session Logout
When you logout on your system we need to invalidate the LoginRadius accesstoken, for this reason you'll need to define our LogoutHandler under your firewall in the security.yaml file. If you don't define it, you will not logout from LoginRadius.
Testing
Contributing
Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see License File for more information.