Download the PHP package wearesho-team/yii2-authentication without Composer
On this page you can find all versions of the php package wearesho-team/yii2-authentication. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wearesho-team/yii2-authentication
More information about wearesho-team/yii2-authentication
Files in wearesho-team/yii2-authentication
Package yii2-authentication
Short Description Yii2 authentication integration
License MIT
Informations about the package yii2-authentication
Yii2 Authentication
Simple Yii2 library to authenticate API users and generate authorization tokens using wearesho-team/yii2-authorization
Installation
Using composer
Usage
First, you need to implement IdentityInterface. Then, you can use Controller in your applications.
Configuration
HTTP Routes
There is only one action declared in controllers: index. It can be called using different HTTP methods. There is a description for each action in controllers below.
Base controller
POST
Tries to login with passed credentials
-
Body params
-
Response 202 - When credentials are correct and access token is created
- Response 400 - When you passed invalid login/password or one of this attributes is empty
DELETE
Action for logout
-
Query params
-
Response 205 - When token is successfully deleted
- Response 400 - When passed token is invalid or empty
PUT
This action interprets token refreshment. Current access token will be deleted, new one will be created and returned.
-
Query params:
-
Response 205 - Current token is being deleted and new one is created
- Response 400 - When passed token is invalid or empty
Two Factor Authentication
There is also and implementation of two-factor authentication in this library.
License
MIT
All versions of yii2-authentication with dependencies
horat1us/yii2-migration-bootstrap Version ^1.3
wearesho-team/token-generator Version ^1.2
wearesho-team/yii-http Version ^1.14
wearesho-team/yii2-authorization Version ^1.3 | ^2.0
wearesho-team/yii2-tokens Version ^1.1
yiisoft/yii2 Version ^2.0.47