SDK for PHP 3.x

Token extends BearerTokenIdentity
in package
implements TokenInterface, Serializable

Basic implementation of the AWS Token interface that allows callers to pass in an AWS token in the constructor.

Table of Contents

Interfaces

TokenInterface
Provides access to an AWS token used for accessing AWS services
Serializable

Methods

__construct()  : mixed
Constructs a new basic token object, with the specified AWS token
__serialize()  : array<string|int, mixed>
__set_state()  : mixed
Sets the state of a token object
__unserialize()  : mixed
Sets the state of this object from an array
getExpiration()  : int
Get the UNIX timestamp in which the token will expire
getToken()  : string
Returns the token this token object.
isExpired()  : bool
Check if the token are expired
serialize()  : string
toArray()  : array<string|int, mixed>
Converts the token to an associative array.
unserialize()  : mixed
Sets the state of the object from serialized json data

Methods

__construct()

Constructs a new basic token object, with the specified AWS token

public __construct(string $token[, int $expires = null ]) : mixed
Parameters
$token : string

Security token to use

$expires : int = null

UNIX timestamp for when the token expires

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__set_state()

Sets the state of a token object

public static __set_state(array<string|int, mixed> $state) : mixed
Parameters
$state : array<string|int, mixed>

array containing 'token' and 'expires'

__unserialize()

Sets the state of this object from an array

public __unserialize(mixed $data) : mixed
Parameters
$data : mixed

getExpiration()

Get the UNIX timestamp in which the token will expire

public getExpiration() : int
Return values
int

getToken()

Returns the token this token object.

public getToken() : string
Return values
string

isExpired()

Check if the token are expired

public isExpired() : bool
Return values
bool

serialize()

public serialize() : string
Return values
string

toArray()

Converts the token to an associative array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

unserialize()

Sets the state of the object from serialized json data

public unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
On this page