AuthCodeRepository
extends AbstractTokenRepository
in package
implements
AuthCodeRepositoryInterface
OAuth2 authorization code repository implementation.
Tags
Interfaces, Classes, Traits and Enums
- AuthCodeRepositoryInterface
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
- getNewAuthCode() : AuthCodeEntityInterface
- Create a new authentication code
- isAuthCodeRevoked() : bool
- Check if the authentication code has been revoked.
- isRevoked() : bool
- Check if a token is revoked
- persistNew() : void
- Persist a token in the database
- persistNewAuthCode() : void
- Persists a new authentication code to permanent storage.
- revoke() : void
- Revoke a token
- revokeAuthCode() : void
- Revoke an authentication code.
Properties
$accessTokenService
protected
AccessTokenServiceInterface
$accessTokenService
$entityClass
protected
string
$entityClass
$oauth2Config
protected
array<string|int, mixed>
$oauth2Config
$tokenType
protected
string
$tokenType
$userService
protected
UserServiceInterface
$userService
Methods
__construct()
Constructor
public
__construct(array<string|int, mixed> $oauth2Config, AccessTokenServiceInterface $accessTokenService, UserServiceInterface $userService) : mixed
Parameters
- $oauth2Config : array<string|int, mixed>
-
OAuth2 configuration
- $accessTokenService : AccessTokenServiceInterface
-
Access token service
- $userService : UserServiceInterface
-
User service
Return values
mixed —getNew()
Get a new token
public
getNew() : object
Return values
object —getNewAuthCode()
Create a new authentication code
public
getNewAuthCode() : AuthCodeEntityInterface
Return values
AuthCodeEntityInterface —isAuthCodeRevoked()
Check if the authentication code has been revoked.
public
isAuthCodeRevoked(string $tokenId) : bool
Parameters
- $tokenId : string
-
Token ID
Return values
bool —Return true if this code has been revoked
isRevoked()
Check if a token is revoked
public
isRevoked(string $tokenId) : bool
Parameters
- $tokenId : string
-
Token ID
Return values
bool —persistNew()
Persist a token in the database
public
persistNew(object $token) : void
Parameters
- $token : object
-
Token
Tags
Return values
void —persistNewAuthCode()
Persists a new authentication code to permanent storage.
public
persistNewAuthCode(AuthCodeEntityInterface $entity) : void
Parameters
- $entity : AuthCodeEntityInterface
-
Authentication code entity
Tags
Return values
void —revoke()
Revoke a token
public
revoke(string $tokenId) : void
Parameters
- $tokenId : string
-
Token ID
Return values
void —revokeAuthCode()
Revoke an authentication code.
public
revokeAuthCode(string $tokenId) : void
Parameters
- $tokenId : string
-
Token ID