class Token extends OperatorResource implements Token

Represents an Identity v2 Token.

Traits

Properties

$issuedAt DateTimeImmutable
$id string
$expires DateTimeImmutable
$tenant Tenant

Methods

populateFromResponse (ResponseInterface $response) : AbstractResource

All models which represent an API resource should be able to be populated from a {see ResponseInterface} object.

getId ()

No description

hasExpired () : bool

Indicates whether the token has expired or not.

Details

populateFromResponse(ResponseInterface $response)

All models which represent an API resource should be able to be populated from a {see ResponseInterface} object.

Parameters

$response ResponseInterface

Return value

AbstractResource

Example code

$abstractResource = $token->populateFromResponse($response);

getId()

Example code

$token->getId();

hasExpired()

Indicates whether the token has expired or not.

Return value

bool TRUE if the token has expired, FALSE if it is still valid

Example code

$bool = $token->hasExpired();