2017 © Pedro Peláez
 

yii2-extension yii2-uic

The uic extension for Yii2 framework

image

leegoway/yii2-uic

The uic extension for Yii2 framework

  • Thursday, April 6, 2017
  • by leegoway
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-uic

User center extension for Yii2 framework, (*1)

包含功能: * [登录] 接入用户中心的单点登录 * [权限校验] 接入用户中心的权限校验, (*2)

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies., (*3)

To install, either run, (*4)

$ php composer.phar require leegoway/yii2-uic "*"

or add, (*5)

"leegoway/yii2-uic": "*"

to the require section of your composer.json file., (*6)

Usage

return [
    'components' => [
        'uicAuther' => [
            'class' => 'leegoway\uic\Auther',
            'domain' => 'autops.corp.elong.com',//cookie的domain属性
            'path' => '/',//cookie的路径
            'expire' => 7200 //超时时间
        ]
    ],
];

then in your controller which need auth, then add the following code:, (*7)

use leegoway\uic\UicAuthFacade;

...
use UicAuthFacade;

Secondly, you can check permission like the following code:, (*8)

Yii::$app->uicAuther->checkPermission($permissionId, $organizationId, [$username]); //$username default current login username

The Versions

06/04 2017

dev-master

9999999-dev

The uic extension for Yii2 framework

  Sources   Download

BSD 3-Clause

The Requires

 

by Avatar leegoway

extension auth yii2 uic