mo-lin / edu-auth
shanghai edu unified identity authentication
Installs: 108
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mo-lin/edu-auth
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ~5.0|~6.0
This package is auto-updated.
Last update: 2023-01-29 03:45:56 UTC
README
shanghai edu unified identity authentication
Install
composer require mo-lin/edu-auth
Usage
- 获取三方调用链接
$auth = new \EduOauth\Auth();
$link = $auth->getOauthLink('http://x.xx.xxx/callback');
- 通过 code 获取三方用户信息
$code = $GET['code'];
$auth = (new \EduOauth\Auth())->setCallBack('http://x.xx.xxx/callback');
$userInfo = $auth->getUserInfo();