2017 © Pedro Peláez
 

yii2-extension yii2-ucenter

sso ucenter for Yii2

image

lizhi353/yii2-ucenter

sso ucenter for Yii2

  • Sunday, November 8, 2015
  • by lizhi353
  • Repository
  • 2 Watchers
  • 5 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2单点登录扩展yii2Ucenter

说明:这个yii2单点登录是用模块modules的方式实现的。简单易懂。

1. 首先在ucenter添加你的应用。

(1)应用的主URL:$weburl/ucenter
(2)应用接口文件名称:index
(3)其它没什么要说的,记住应用建好之后复制配置信息

2. $webroot/frontend/config目录下添加ucenter.php文件。写入ucenter配置信息。如:

define('UC_CONNECT', 'mysql');
define('UC_DBHOST', 'localhost');
define('UC_DBUSER', 'root');
define('UC_DBPW', '');
define('UC_DBNAME', 'discuz');
define('UC_DBCHARSET', 'utf8');
define('UC_DBTABLEPRE', '`discuz`.pre_ucenter_');
define('UC_DBCONNECT', '0');
define('UC_KEY', '32182vFikUtPT8p4y9L5aPKMngsZHR/ZS4kWFhE');
define('UC_API', 'http://uc.cn/uc_server');
define('UC_CHARSET', 'utf-8');
define('UC_IP', '');
define('UC_APPID', '4');
define('UC_PPP', '20');

define('authkey', '7fc1c0rnpD9RuD7x');
define('UC_CLIENT_RELEASE', '20110501');

3. 将代码复制到将代码复制到$webroot/frontend/modules/ucenter

(1)在$webroot/frontend/config加入ucenter配置文件如ucenter.php, (*1)

  1. 在配置文件中加入module信息。
'modules' => [
        'ucenter' => [
            'class' => 'app\modules\ucenter\Module',
        ],
    ],

The Versions

08/11 2015

dev-master

9999999-dev

sso ucenter for Yii2

  Sources   Download

MIT

The Requires

 

by Avatar lizhi353

yii2 ucenter yii2ucenter yii2-ucenter