AuthorizationToken
extends DataTransferObject
in package
Authorization data including the OAuth bearer token, expiry, and refresh token.
Tags
Table of Contents
Properties
- $accessToken : string|null
- $createdAt : DateTimeImmutable|null
- $expiresIn : int|null
- $refreshToken : string|null
- $scopes : string|null
Methods
- getExpiresAt() : DateTimeImmutable
Properties
$accessToken
public
string|null
$accessToken
The authorized bearer token from the OAuth2 token response.
$createdAt
public
DateTimeImmutable|null
$createdAt
Time the bearer token was created.
$expiresIn
public
int|null
$expiresIn
Number of seconds since creation that the token will expire at.
Please note AuthorizationToken::getExpiresAt() which calculates the expiry time from this and createdAt.
$refreshToken
public
string|null
$refreshToken
The authorized refresh token from the OAuth2 token response.
$scopes
public
string|null
$scopes
The scopes that the token is authorized for.
Methods
getExpiresAt()
public
getExpiresAt() : DateTimeImmutable
Tags
Return values
DateTimeImmutable —Time the bearer token expires at.