class AccessTokenRepository implements AccessTokenRepositoryInterface

Traits

Methods

void
saveToken(Model $token)

Save a credential or fail when a model observer cancels persistence.

__construct(Dispatcher $events)

Create a new repository instance.

AccessTokenEntityInterface
getNewToken(ClientEntityInterface $clientEntity, array $scopes, string|null $userIdentifier = null)

Create a new access token entity.

void
persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity)

Persist a new access token.

void
revokeAccessToken(string $tokenId)

Revoke an access token.

bool
isAccessTokenRevoked(string $tokenId)

Determine whether an access token may authenticate the request.

Details

in PersistsTokens at line 15
protected void saveToken(Model $token)

Save a credential or fail when a model observer cancels persistence.

Parameters

Model $token

Return Value

void

at line 27
__construct(Dispatcher $events)

Create a new repository instance.

Parameters

Dispatcher $events

at line 37
AccessTokenEntityInterface getNewToken(ClientEntityInterface $clientEntity, array $scopes, string|null $userIdentifier = null)

Create a new access token entity.

{@inheritdoc}

Parameters

ClientEntityInterface $clientEntity
array $scopes
string|null $userIdentifier

Return Value

AccessTokenEntityInterface

at line 63
void persistNewAccessToken(AccessTokenEntityInterface $accessTokenEntity)

Persist a new access token.

{@inheritdoc}

Parameters

AccessTokenEntityInterface $accessTokenEntity

Return Value

void

at line 115
void revokeAccessToken(string $tokenId)

Revoke an access token.

{@inheritdoc}

Parameters

string $tokenId

Return Value

void

at line 135
bool isAccessTokenRevoked(string $tokenId)

Determine whether an access token may authenticate the request.

{@inheritdoc}

Parameters

string $tokenId

Return Value

bool