2017 © Pedro Peláez
 

library yii2-basic-auth

basic auth for yii

image

graychen/yii2-basic-auth

basic auth for yii

  • Friday, June 22, 2018
  • by Graychen
  • Repository
  • 1 Watchers
  • 1 Stars
  • 119 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

yii2-basic-auth Latest Stable Version

Total Downloads Build Status Scrutinizer Code Quality Code Coverage Build Status StyleCI, (*1)

This is a basic module for app registration. It registers applications through the background and verifies the API in the way of basic authentication (这是一个app注册的基本模块,通过后台注册应用,以基本认证的方式对api进行验证), (*2)

Usage

Config Migration


'controllerMap' => [ 'migrate' => [ 'class' => 'yii\console\controllers\MigrateController', 'migrationPath' => [ '@graychen/yii2/basic/auth/migrations' ], ], ],

Run Migration

$ yii migrate/up

Config backend module in components part

``` php, (*3)

'auth' => [ 'class' => 'graychen\yii2\basic\auth\Module', ], (*4)


after that,you can website `https://localhost/admin/app` ## Add behaviors in your Controller ```php use graychen\yii2\basic\auth\models\App; use graychen\yii2\basic\auth\filters\HttpBasicAuth; public function behaviors() { return [ 'authenticator' => [ 'class' => HttpBasicAuth::className(), 'auth' => function ($username, $password) { return App::findOne([ 'app_key' => $username, 'app_secret' => $password, ]); } ] ]; }

The Versions

22/06 2018

dev-master

9999999-dev

basic auth for yii

  Sources   Download

MIT

The Requires

 

The Development Requires

by 陈家辉

22/06 2018

v0.0.2

0.0.2.0

basic auth for yii

  Sources   Download

MIT

The Requires

 

The Development Requires

by 陈家辉

11/06 2018

v0.0.1

0.0.1.0

basic auth for yii

  Sources   Download

MIT

The Requires

 

The Development Requires

by 陈家辉