VuFind API Documentation

AccessTokenRepository extends AbstractTokenRepository
in package
implements AccessTokenRepositoryInterface

OAuth2 access token repository implementation.

Tags
category

VuFind

author

Ere Maijala ere.maijala@helsinki.fi

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Interfaces, Classes, Traits and Enums

AccessTokenRepositoryInterface

Table of Contents

$accessTokenService  : AccessTokenServiceInterface
$entityClass  : string
$oauth2Config  : array<string|int, mixed>
$tokenType  : string
$userService  : UserServiceInterface
__construct()  : mixed
Constructor
getNew()  : object
Get a new token
getNewToken()  : AccessTokenEntityInterface
Create a new access token
isAccessTokenRevoked()  : bool
Check if the access token has been revoked.
isRevoked()  : bool
Check if a token is revoked
persistNew()  : void
Persist a token in the database
persistNewAccessToken()  : void
Persists a new access token to permanent storage.
revoke()  : void
Revoke a token
revokeAccessToken()  : void
Revoke an access token.

Properties

Methods

getNewToken()

Create a new access token

public getNewToken(ClientEntityInterface $clientEntity, array<string|int, ScopeEntityInterface$scopes[, mixed $userIdentifier = null ]) : AccessTokenEntityInterface
Parameters
$clientEntity : ClientEntityInterface

Client entity

$scopes : array<string|int, ScopeEntityInterface>

Scopes

$userIdentifier : mixed = null

User identifier

Return values
AccessTokenEntityInterface

isAccessTokenRevoked()

Check if the access token has been revoked.

public isAccessTokenRevoked(string $tokenId) : bool
Parameters
$tokenId : string

Token ID

Return values
bool

Return true if this token has been revoked

isRevoked()

Check if a token is revoked

public isRevoked(string $tokenId) : bool
Parameters
$tokenId : string

Token ID

Return values
bool

persistNewAccessToken()

Persists a new access token to permanent storage.

public persistNewAccessToken(AccessTokenEntityInterface $entity) : void
Parameters
$entity : AccessTokenEntityInterface

Access token entity

Tags
throws
InvalidArgumentException
Return values
void

revoke()

Revoke a token

public revoke(string $tokenId) : void
Parameters
$tokenId : string

Token ID

Return values
void

revokeAccessToken()

Revoke an access token.

public revokeAccessToken(string $tokenId) : void
Parameters
$tokenId : string

Token ID

Return values
void

Search results