p9d/oauth2-toolkit
最新稳定版本:v0.1.0
Composer 安装命令:
composer require p9d/oauth2-toolkit
包简介
README 文档
README
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');
Provider configuration:
configuration_endpoint- URL to OpenID Discovery Endpoint?client_idClient ID used for this provider
Methods available in OpenIdConfigurationService
getAuthorizationUrl(): string
Returns a link user should be redirected to login.
parameters:
grantType,redirectUri?clientId- when not passed, value passed inclient_idfrom configuration will be used.?scope?state
getJwks(): array
Returns an array of JSON Web Key Set.
统计信息
- 总下载量: 314
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-31