Download the PHP package henrik/token-auth without Composer
On this page you can find all versions of the php package henrik/token-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download henrik/token-auth
More information about henrik/token-auth
Files in henrik/token-auth
Download henrik/token-auth
More information about henrik/token-auth
Files in henrik/token-auth
Vendor henrik
Package token-auth
Short Description This package created for token based authorization
License MIT
Package token-auth
Short Description This package created for token based authorization
License MIT
Please rate this library. Is it a good library?
Informations about the package token-auth
Hash Auth!
How to install
composer require henrik/token-auth
Configurations For Laravel Framework.
-
Create a helper file
app\Helpers\TokenManagerHelper.php
. -
Then create
hash_auth.config
file into your laravel configs folder. -
Then add into your
.env
file this lines -
Type in your console
php artisan make:middleware HashAuthFilterMiddleware
- Then paste this code into created file
open Kernel.php file and add middleware into $routeMiddleware like this
- Add this functions into your
User.php
model
The example login action (must return token string in json format):
The registered middleware you can use for your routes. For example:
The request lifecycle in graph dagram.
graph LR
R[Request With Token] --> HAM
HAM --> R
HAM((HashAuthFilterMiddleware)) -->A
A-->HAM
A[Token Manager] -- Token --> TP((Token Parser))
TP -- data --> A
TB((Token Builder)) -- token --> A
A -- data --> TB
TB --> T{Token}
TP --> T
CL[Claim] --> T
DL[DataLine] -->T
All versions of token-auth with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1.3
ext-json Version *
ext-openssl Version *
ext-json Version *
ext-openssl Version *
The package henrik/token-auth contains the following files
Loading the files please wait ....