planete-croisiere/oauth2-envconfig
Composer 安装命令:
composer require planete-croisiere/oauth2-envconfig
包简介
OAuth2 Client generic provider for config by .env file
README 文档
README
This package provides OAuth 2.0 generic support from config .env file for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
composer require planete-croisiere/oauth2-envconfig
Usage
Usage is the same as The League's OAuth client, using \PlaneteCroisiere\OAuth2\Client\Provider\EnvConfig as the provider.
knpuniversity/oauth2-client-bundle configuration example
knpu_oauth2_client: clients: youapp_oauth: type: generic provider_class: PlaneteCroisiere\OAuth2\Client\Provider\EnvConfigProvider provider_options: "scopes": '%env(OAUTH2_SCOPES)%' "app_url": '%env(OAUTH2_BASE_APP_URL)%' "api_url": '%env(OAUTH2_BASE_API_URL)%' client_id: '%env(OAUTH2_CLIENT_ID)%' client_secret: '%env(OAUTH2_CLIENT_SECRET)%' redirect_route: oauth2_check redirect_params: {} use_state: false
You must define the 6 environment variables :
- OAUTH2_CLIENT_ID
- OAUTH2_CLIENT_SECRET
- OAUTH2_SCOPES
- OAUTH2_BASE_APP_URL
- OAUTH2_BASE_API_URL
You must create the route "oauth2_check".
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-26