weigreen/ncuportal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

License

NCUPortal is licensed under the MIT License.

统计信息

  • 总下载量: 83
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-08