W3cubDocs

/Symfony 4.1

InMemoryTokenProvider

class InMemoryTokenProvider implements TokenProviderInterface

This class is used for testing purposes, and is not really suited for production.

Methods

PersistentTokenInterface loadTokenBySeries(string $series)

Loads the active token for the given series.

updateToken(string $series, string $tokenValue, DateTime $lastUsed)

Updates the token according to this data.

deleteTokenBySeries(string $series)

Deletes all tokens belonging to series.

createNewToken(PersistentTokenInterface $token)

Creates a new token.

Details

PersistentTokenInterface loadTokenBySeries(string $series)

Loads the active token for the given series.

Parameters

string $series

Return Value

PersistentTokenInterface

Exceptions

TokenNotFoundException if the token is not found

updateToken(string $series, string $tokenValue, DateTime $lastUsed)

Updates the token according to this data.

Parameters

string $series
string $tokenValue
DateTime $lastUsed

Exceptions

TokenNotFoundException if the token is not found

deleteTokenBySeries(string $series)

Deletes all tokens belonging to series.

Parameters

string $series

createNewToken(PersistentTokenInterface $token)

Creates a new token.

Parameters

PersistentTokenInterface $token