Download the PHP package digit-soft/laravel-token-auth without Composer
On this page you can find all versions of the php package digit-soft/laravel-token-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download digit-soft/laravel-token-auth
More information about digit-soft/laravel-token-auth
Files in digit-soft/laravel-token-auth
Package laravel-token-auth
Short Description Laravel token auth cached.
License MIT
Informations about the package laravel-token-auth
Token auth for Laravel 7+
Component uses Redis to store token information
Install
Publish config
Configure guard
Change driver to token-cached
in config/auth.php
Ships with multiple middleware
DigitSoft\LaravelTokenAuth\Middleware\DefaultAuthGuard
- set default auth guard to given valueDigitSoft\LaravelTokenAuth\Middleware\DefaultSessionDriver
- set default session driver to given valueDigitSoft\LaravelTokenAuth\Middleware\AddGeneratedTokenToResponse
- adds token generated during request to response header Some middleware useful for PHP-PM driven applications.
Sessions
There is possibility to save session data to token, if you will use package session handler DigitSoft\LaravelTokenAuth\Session\TokenSessionHandler
, driver name is token-cached
. You can also set it with DefaultSessionDriver
middleware.
Often rewritable data such as previous page, flashes and _token are not stored.
Events
There is DigitSoft\LaravelTokenAuth\Events\AccessTokenCreated
, which fired every time token is created by TokenCached
facade.
So you can write or check information in AccessToken
with own event listener.
Customization
- You can use your own
AccessToken
implementation by extending original class and set its name in config. - You can set your own header name for
AddGeneratedTokenToResponse
middleware in config.
You can find more options and description in config file.