class Blacklist implements BlacklistContract

Methods

__construct(StorageContract $storage, int $gracePeriod = 0, int $refreshTTL = 20160, string $key = 'jti')

No description

bool
add(array $payload)

Add the token (jti claim) to the blacklist.

int
getMinutesUntilExpired(array $payload)

Get the number of minutes until the token expiry.

bool
addForever(array $payload)

Add the token (jti claim) to the blacklist indefinitely.

bool
has(array $payload)

Determine whether the token has been blacklisted.

bool
remove(array $payload)

Remove the token (jti claim) from the blacklist.

bool
clear()

Remove all tokens from the blacklist.

int
getGraceTimestamp()

Get the timestamp when the blacklist comes into effect This defaults to immediate (0 seconds).

setGracePeriod(int $gracePeriod)

Set the grace period.

int
getGracePeriod()

Get the grace period.

mixed
getKey(array $payload)

Get the unique key held within the blacklist.

setKey(string $key)

Set the unique key held within the blacklist.

setRefreshTTL(int $ttl)

Set the refresh time limit.

int
getRefreshTTL()

Get the refresh time limit.

CarbonInterface
timestamp(int $timestamp)

No description

Details

at line 15
__construct(StorageContract $storage, int $gracePeriod = 0, int $refreshTTL = 20160, string $key = 'jti')

No description

Parameters

StorageContract $storage
int $gracePeriod
int $refreshTTL
string $key

at line 26
bool add(array $payload)

Add the token (jti claim) to the blacklist.

Parameters

array $payload

Return Value

bool

at line 51
protected int getMinutesUntilExpired(array $payload)

Get the number of minutes until the token expiry.

Parameters

array $payload

Return Value

int

at line 69
bool addForever(array $payload)

Add the token (jti claim) to the blacklist indefinitely.

Parameters

array $payload

Return Value

bool

at line 79
bool has(array $payload)

Determine whether the token has been blacklisted.

Parameters

array $payload

Return Value

bool

at line 98
bool remove(array $payload)

Remove the token (jti claim) from the blacklist.

Parameters

array $payload

Return Value

bool

at line 106
bool clear()

Remove all tokens from the blacklist.

Return Value

bool

at line 117
protected int getGraceTimestamp()

Get the timestamp when the blacklist comes into effect This defaults to immediate (0 seconds).

Return Value

int

at line 130
Blacklist setGracePeriod(int $gracePeriod)

Set the grace period.

Boot-only. Blacklist is a worker-lifetime singleton; runtime mutation affects every subsequent request and races across coroutines.

Parameters

int $gracePeriod

Return Value

Blacklist

at line 140
int getGracePeriod()

Get the grace period.

Return Value

int

at line 148
mixed getKey(array $payload)

Get the unique key held within the blacklist.

Parameters

array $payload

Return Value

mixed

at line 165
Blacklist setKey(string $key)

Set the unique key held within the blacklist.

Boot-only. Blacklist is a worker-lifetime singleton; runtime mutation affects every subsequent request and races across coroutines.

Parameters

string $key

Return Value

Blacklist

at line 180
Blacklist setRefreshTTL(int $ttl)

Set the refresh time limit.

Boot-only. Blacklist is a worker-lifetime singleton; runtime mutation affects every subsequent request and races across coroutines.

Parameters

int $ttl

Return Value

Blacklist

at line 190
int getRefreshTTL()

Get the refresh time limit.

Return Value

int

at line 195
protected CarbonInterface timestamp(int $timestamp)

No description

Parameters

int $timestamp

Return Value

CarbonInterface