Download the PHP package laranex/laravel-refresh-token without Composer
On this page you can find all versions of the php package laranex/laravel-refresh-token. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laranex/laravel-refresh-token
More information about laranex/laravel-refresh-token
Files in laranex/laravel-refresh-token
Package laravel-refresh-token
Short Description A package to help you implement refresh token mechanism in your laravel application
License MIT
Homepage https://github.com/laranex/laravel-refresh-token
Informations about the package laravel-refresh-token
Laravel Refresh Token
A package to help you implement refresh token mechanism in your laravel application
Installation
You can install the package via composer:
Generate encryption keys
Run The migration file
You can publish the config file with:
This is the contents of the published config file:
Overriding the default values (Optional)
The following static methods are available under the Laranex\RefreshToken\RefreshToken
class to override the default values. Invoking them
with the value you want in the service provider will override the default values.
useRefreshTokenModel(string $refreshTokenModel): void
loadKeysFrom(string $path): void
refreshTokensExpireIn(DateTimeInterface $date = null): DateInterval|static
Usage
-
Use the trait in your refresh tokenable model
-
Create a refresh token
-
Verify a refresh token
- a token instance will be return if the token is valid, or else null will be return
-
Working with verified refresh token
-
You can access the token instance by calling the
instance
property, The instance property will return the model instance that you use the RefreshToken trait in -
Revoking the refresh token (The token will no longer be valid)
- Revoking all refresh tokens which are related to current refresh token instance
-
Prune Command
-
You can use the prune command to delete all expired refresh tokens
- Or you can put this into a scheduler to run it periodically
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-refresh-token with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^9.0 | ^10.0
illuminate/console Version ^9.0|^10.0
illuminate/container Version ^9.0|^10.0
illuminate/support Version ^9.0|^10.0
lcobucci/jwt Version ^4.3|^5.0
lcobucci/clock Version ^2.2 || ^3.0
phpseclib/phpseclib Version ^3.0
league/oauth2-server Version 7.* | ^8.5.1
nesbot/carbon Version ^2.67