Blacklist
class Blacklist implements BlacklistContract
Methods
Create a new blacklist instance.
Add the token (jti claim) to the blacklist.
Add the token (jti claim) to the blacklist indefinitely.
Add the token to the blacklist indefinitely after its grace period.
Determine whether the token has been blacklisted.
Remove the token (jti claim) from the blacklist.
Remove all tokens from the blacklist.
Get the timestamp when the blacklist comes into effect This defaults to immediate (0 seconds).
Set the grace period.
Get the grace period.
Get the unique key held within the blacklist.
Set the refresh time limit.
Get the refresh time limit.
Create a date from a Unix timestamp.
Details
at line 19
__construct(StorageContract $storage, int|null $refreshTTL, int $gracePeriod = 0, int $leeway = 0, string $key = 'jti')
Create a new blacklist instance.
at line 31
bool
add(array $payload)
Add the token (jti claim) to the blacklist.
at line 79
bool
addForever(array $payload)
Add the token (jti claim) to the blacklist indefinitely.
at line 87
protected bool
addForeverWithGracePeriod(array $payload)
Add the token to the blacklist indefinitely after its grace period.
at line 107
bool
has(array $payload)
Determine whether the token has been blacklisted.
at line 126
bool
remove(array $payload)
Remove the token (jti claim) from the blacklist.
at line 134
bool
clear()
Remove all tokens from the blacklist.
at line 143
protected int
getGraceTimestamp()
Get the timestamp when the blacklist comes into effect This defaults to immediate (0 seconds).
at line 156
Blacklist
setGracePeriod(int $gracePeriod)
Set the grace period.
On the shared blacklist, runtime mutation affects every subsequent request and races across coroutines.
at line 167
int
getGracePeriod()
Get the grace period.
at line 175
string
getKey(array $payload)
Get the unique key held within the blacklist.
at line 198
Blacklist
setKey(string $key)
Set the unique key held within the blacklist.
On the shared blacklist, runtime mutation affects every subsequent request and races across coroutines.
at line 214
Blacklist
setRefreshTTL(int|null $ttl)
Set the refresh time limit.
On the shared blacklist, runtime mutation affects every subsequent request and races across coroutines.
at line 225
int|null
getRefreshTTL()
Get the refresh time limit.
at line 233
protected CarbonInterface
timestamp(int $timestamp)
Create a date from a Unix timestamp.