mwstake/mediawiki-component-oauth-client
最新稳定版本:2.0.1
Composer 安装命令:
composer require mwstake/mediawiki-component-oauth-client
包简介
Library for user authentication over OAuth2 protocol
README 文档
README
Library for user authentication over OAuth2 protocol.
Installation
composer require mwstake/mediawiki-component-oauth-client
Usage
Connection params
$GLOBALS['wgOAuthClientConfig'] = [ 'base_uri' => '', 'client_id' => '##CLIENT_ID##', 'client_secret' => '##CLIENT_SECRET##', // if needed adapt endpoints, if not, omit to use the defaults 'endpoints' => [ 'authorize' => '/oauth2/authorize', 'token' => '/oauth2/token', 'user' => '/oauth2/user', ], // if needed adapt scopes, if not, omit to use the defaults 'default_scopes' => [], 'redirect_uri' => ##REDIRECT_URI##, ];
Login page
Your implementation needs to provide a login page that will be used as the redirect target for the OAuth2 authorization code flow.
Specify the name of the SpecialPage in $GLOBALS['wgOAuthLoginPage'] = 'MyPage;`
Resource owner
If you want to have a custom resource owner, implement a class that implements League\OAuth2\Client\Provider\ResourceOwnerInterface
and set it in $GLOBALS['wgOAuthClientResourceOwner'] = MyResourceOwner::class;.
Otherwise, the default League\OAuth2\Client\Provider\GenericResourceOwner will be used.
统计信息
- 总下载量: 389
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2022-10-28