testing
This commit is contained in:
@@ -38,6 +38,15 @@ class User extends Authenticatable
|
||||
];
|
||||
}
|
||||
|
||||
public function jwtNeedsRefresh(int $refreshIntervalSeconds = 3600): bool
|
||||
{
|
||||
if (blank($this->user_jwt) || ! $this->user_jwt_issued_at) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->user_jwt_issued_at->lte(now()->subSeconds($refreshIntervalSeconds));
|
||||
}
|
||||
|
||||
public function markPrivilegesChanged(): void
|
||||
{
|
||||
$this->increment('privileges_version');
|
||||
|
||||
Reference in New Issue
Block a user