PHP code example of m.rahimi / laravel-tokenize-auth
1. Go to this page and download the library: Download m.rahimi/laravel-tokenize-auth library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* The life time of tokens in seconds.
*/
'token_ttl' => 120,
/**
* Determine if you are ok with using the routes
* defined within the package or you want to define them
*/
'use_default_routes' => true,
/**
* The rules to validate the the receiver address.
* Whether email or phone number.
*/
'address_validation_rules' => [' token.
* You may define your own token sender class.
*/
'token_sender' => \TokenizedLogin\TokenSenders\TokenSender::class,
/**
* You can change the way you generate the token by define you own class.
*/
'token_generator' => \TokenizedLogin\TokenGenerators\TokenGenerator::class,
/**
* You can extend Responses class and override
* it's methods, to define your own responses.
*/
'responses' => \TokenizedLogin\Http\Responses\Responses::class,
/**
* You can change the way you fetch the user from your database
* by defining a custom user provider class, and set it here.
*/
'user_provider' => \TokenizedLogin\UserProvider::class,
/**
* You may provide a middleware throttler to throttle
* the requesting and submission of the tokens.
*/
'throttler_middleware' => 'throttle:3,1',
];
php artisan vendor:publish
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.