AccessToken
class AccessToken implements AccessTokenEntityInterface, Transient
Traits
Properties
| protected Token|null | $token | The model saved when this token was issued. |
|
| protected string|null | $serializedToken | The signed representation shared by the response and its extensions. |
Methods
Create a new token instance.
Set the token identifier.
Set the identifier of the user associated with the token.
Set the client that the token was issued to.
Associate a scope with the token.
Set the private key used to sign this access token.
Initialize the JWT configuration.
Generate a string representation from the access token.
Details
at line 47
__construct(string|null $userIdentifier, array $scopes, ClientEntityInterface $client)
Create a new token instance.
at line 65
void
setIdentifier(string $identifier)
Set the token identifier.
at line 74
void
setExpiryDateTime(DateTimeImmutable $dateTime)
Set the date time when the token expires.
at line 85
void
setUserIdentifier(string $identifier)
Set the identifier of the user associated with the token.
at line 94
void
setClient(ClientEntityInterface $client)
Set the client that the token was issued to.
at line 103
void
addScope(ScopeEntityInterface $scope)
Associate a scope with the token.
at line 112
void
setPrivateKey(CryptKeyInterface $privateKey)
Set the private key used to sign this access token.
at line 121
Token|null
getToken()
Get the model saved when this token was issued.
at line 129
void
setToken(Token $token)
Set the model saved when this token was issued.
at line 138
void
initJwtConfiguration()
Initialize the JWT configuration.
at line 198
string
toString()
Generate a string representation from the access token.