easyswoole / o-auth
easyswoole component
Installs: 1 770
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 3
Open Issues: 0
Requires
- php: >=7.1.0
- ext-swoole: ^4.4.0
- easyswoole/http-client: ^1.2
Requires (Dev)
- easyswoole/phpunit: >=1.0.0
- easyswoole/swoole-ide-helper: ^1.2
This package is auto-updated.
Last update: 2024-11-08 15:17:11 UTC
README
介绍
基于easyswoole/http-client
对第三方登录授权的SDK。
安装
composer require easyswoole/o-auth
代码
公共的方法:
getAuthUrl()
获取授权地址getAccessToken($storeState = null, $state = null, $code = null)
获取AccessToken(只返回access_token)getAccessTokenResult()
执行getAccessToken
方法后,此方法获取原结果getUserInfo(string $accessToken)
获取用户信息validateAccessToken(string $accessToken)
验证token是否有效refreshToken(string $refreshToken = null)
刷新token 返回bool
getRefreshTokenResult()
执行refreshToken
方法后,此方法获取原结果