weigreen/ncuportal
最新稳定版本:1.0.0
Composer 安装命令:
composer require weigreen/ncuportal
包简介
ncu portal library
README 文档
README
NCUPortal is a library providing an easier and expressive way to use NCU Portal to let users login to your application.
Requirements
- PHP >=5.4
Installation
Add this to your composer.json.
"require": { "weigreen/ncuportal": "v1.0.0" }
Examples
First phase (create url to redirect user to ncu portal)
// Set up NCUPortal with your application's domain $ncuPortal = new NCUPortal('your-application-domain'); // Get Auth URL with call back url $ncuPortal->getAuthUrl('call-back-url');
PS: callback url is used when user login on NCU Portal and will redirect to callback url
Second phase (callback)
// Set up NCUPortal with your application's domain $ncuPortal = new NCUPortal('your-application-domain'); // Check if callback is validate or not // One time used. Second call will be false if($ncuPortal->checkLoginValidate()){ echo "Login Real"; // get login account echo $ncuPortal->getLoginAccount(); }else{ echo "Login is not real >_<"; }
Bug
If you found bugs, please contact me at issue. thanks :)
Links
- iignatov/LightOpenID - Library used for openid.
- OpenID Dev Specifications - documentation for the OpenID extensions and related topics.
License
NCUPortal is licensed under the MIT License.
统计信息
- 总下载量: 83
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-08