Tools to deal with OAuth2/OpenID protocols.
If your identity providers are providing an well-known OpenID Configuration endpoint, you can use them to discover all required things to integrate with them:
$providers = [
'your-provider-name-here' => [
'configuration_endpoint' => 'https://<url>/realms/ACME/.well-known/openid-configuration',
'client_id' => 'XXXXXXXXXXXXX'
],
'google' => [
'configuration_endpoint' => 'https://accounts.google.com/.well-known/openid-configuration'
]
];
$factory = new \P9D\OAuth2Toolkit\OpenIdConfigurationFactory(
$providers,
\Symfony\Component\HttpClient\HttpClient::create()
);
# Access provider config via:
$provider = $factory->createForProvider('your-provider-name-here');
configuration_endpoint
- URL to OpenID Discovery Endpoint?client_id
Client ID used for this provider
Returns a link user should be redirected to login.
grantType
,redirectUri
?clientId
- when not passed, value passed inclient_id
from configuration will be used.?scope
?state
Returns an array of JSON Web Key Set.