Download the PHP package ddruganov/yii2-api-auth-proxy without Composer
On this page you can find all versions of the php package ddruganov/yii2-api-auth-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ddruganov/yii2-api-auth-proxy
More information about ddruganov/yii2-api-auth-proxy
Files in ddruganov/yii2-api-auth-proxy
Download ddruganov/yii2-api-auth-proxy
More information about ddruganov/yii2-api-auth-proxy
Files in ddruganov/yii2-api-auth-proxy
Vendor ddruganov
Package yii2-api-auth-proxy
Short Description Authentication proxy tools for yii2
License
Package yii2-api-auth-proxy
Short Description Authentication proxy tools for yii2
License
Please rate this library. Is it a good library?
Informations about the package yii2-api-auth-proxy
yii2-api-auth-proxy
An authentication proxy component library that connects your app with the yii2-api-auth server
Installation
composer require ddruganov/yii2-api-auth-proxy
Configuration
-
Add this to your app's main config:
- Add this to your app's params config:
How to use
POST /auth/login
with an access token that you got from logging in on the yii2-api-auth server to check that your log in is validPOST /auth/refresh
with your refresh token to get a fresh pair of tokens form the main serverPOST /auth/logout
to send a logout request to the main server- Use
Yii::$app->get(AuthServiceInterface::class)->getUser()
to get theddruganov\Yii2ApiAuthProxy\components\AuthServiceUser
- Attach
AuthFilter
as a behavior to yourApiController
to only allow authenticated users to access the endpoints - Attach
RbacFilter
as a behavior to yourApiController
to only allow users with specific permissions to access the endpoints
Extending AuthServiceInterface::getUser()
example
All versions of yii2-api-auth-proxy with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
^2.0
firebase/php-jwt Version ^6.0
ddruganov/yii2-api-essentials Version ^1
firebase/php-jwt Version ^6.0
ddruganov/yii2-api-essentials Version ^1
The package ddruganov/yii2-api-auth-proxy contains the following files
Loading the files please wait ....