Token
class Token implements TokenInterface (View source)
Class Token.
Properties
protected string | $access_token | Access token. | |
protected string | $refresh_token | Refresh token. | |
protected string | $token_type | Token type. | |
protected DateTime | $expires_at | Expires at. |
Methods
__construct(string $access_token, string $refresh_token = null, string $token_type = 'Bearer', int $expires_in = null)
Constructor.
setAccessToken(string $access_token)
Set access token.
string
getAccessToken()
Get access token.
setRefreshToken(string $refresh_token)
Set refresh token.
string|null
getRefreshToken()
Get refresh token.
setTokenType(string $token_type)
Set token type.
string
getTokenType()
Get token type.
setExpiresAt(string $expires_at)
Set expires at.
getExpiresAt()
Get expires at.
bool
isExpired()
Determine if a token is expired.
Details
at line 49
__construct(string $access_token, string $refresh_token = null, string $token_type = 'Bearer', int $expires_in = null)
Constructor.
at line 81
setAccessToken(string $access_token)
Set access token.
at line 91
string
getAccessToken()
Get access token.
at line 101
setRefreshToken(string $refresh_token)
Set refresh token.
at line 111
string|null
getRefreshToken()
Get refresh token.
at line 121
setTokenType(string $token_type)
Set token type.
at line 131
string
getTokenType()
Get token type.
at line 141
setExpiresAt(string $expires_at)
Set expires at.
at line 161
bool
isExpired()
Determine if a token is expired.