Methods |
public
static
|
setTimeNow(int $timeNow): void
Set the time now. This should only be used for testing purposes.
Set the time now. This should only be used for testing purposes.
Parameters
$timeNow |
the time in seconds since epoch
|
|
#
|
public
static
|
resetTimeNow(): void
Reset the time now if it was set for test purposes.
Reset the time now if it was set for test purposes.
|
#
|
public
|
getTimeNow(): int
|
#
|
public
|
__construct(array $options = [])
Constructs an access token.
Constructs an access token.
Parameters
$options |
An array of options returned by the service provider
in the access token request. The access_token option is required.
|
Throws
|
#
|
protected
|
isExpirationTimestamp(integer $value): bool
Check if a value is an expiration timestamp or second value.
Check if a value is an expiration timestamp or second value.
|
#
|
public
|
getToken()
Returns the access token string of this instance.
Returns the access token string of this instance.
Implements
|
#
|
public
|
getRefreshToken()
Returns the refresh token, if defined.
Returns the refresh token, if defined.
Implements
|
#
|
public
|
getExpires()
Returns the expiration timestamp in seconds, if defined.
Returns the expiration timestamp in seconds, if defined.
Implements
|
#
|
public
|
getResourceOwnerId()
Returns the resource owner identifier, if defined.
Returns the resource owner identifier, if defined.
Implements
|
#
|
public
|
hasExpired()
Checks if this token has expired.
Checks if this token has expired.
Returns
true if the token has expired, false otherwise.
Implements
|
#
|
public
|
getValues()
Returns additional vendor values stored in the token.
Returns additional vendor values stored in the token.
Implements
|
#
|
public
|
__toString()
Returns a string representation of the access token
Returns a string representation of the access token
Implements
|
#
|
public
|
jsonSerialize()
|
#
|