mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-29 10:29:50 +01:00
20 lines
464 B
PHP
20 lines
464 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Laravel\Passport\Http\Middleware\CreateFreshApiToken as CreateFreshApiToken;
|
||
|
|
||
|
class CustomCreateFreshApiToken extends CreateFreshApiToken
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
* Determine if the request should receive a fresh token.
|
||
|
*
|
||
|
* @param \Illuminate\Http\Request $request
|
||
|
* @return bool
|
||
|
*/
|
||
|
protected function requestShouldReceiveFreshToken($request)
|
||
|
{
|
||
|
return $request->user($this->guard);
|
||
|
}
|
||
|
}
|