Class Token
- Aws\Token\Token implements Aws\Token\TokenInterface, Serializable
- Namespace: Aws\Token
- Located at Token/Token.php
Basic implementation of the AWS Token interface that allows callers to pass in an AWS token in the constructor.
Direct known subclasses
Methods Summary
-
__construct ( string $token, int $expires = null )
Constructs a new basic token object, with the specified AWS token
-
static
__set_state ( array $state )
Sets the state of a token object
- getToken ( )
- getExpiration ( )
- isExpired ( )
- toArray ( )
- serialize ( )
-
unserialize ( $serialized )
Sets the state of the object from serialized json data
- __serialize ( )
-
__unserialize ( $data )
Sets the state of this object from an array
Methods Details
__construct ( string $token, integer $expires = null )
Constructs a new basic token object, with the specified AWS token
Parameters
string | $token | Security token to use |
integer | $expires = null | UNIX timestamp for when the token expires |
static __set_state ( array $state )
Sets the state of a token object
Parameters
array | $state | array containing 'token' and 'expires' |
string getToken ( )
integer getExpiration ( )
boolean isExpired ( )
array toArray ( )
string serialize ( )
Returns
string |
Implementation of
Serializable::serialize()
unserialize ( $serialized )
Sets the state of the object from serialized json data
Implementation of
Serializable::unserialize()
array __serialize ( )
Returns
array |
__unserialize ( $data )
Sets the state of this object from an array