SDK for PHP 3.x

SsoToken extends Token
in package

Token that comes from the SSO provider

Table of Contents

Methods

__construct()  : mixed
Constructs a new SSO 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
fromTokenData()  : SsoToken
Creates an instance of SsoToken from a token data.
getClientId()  : string|null
getClientSecret()  : string|null
getExpiration()  : int
Get the UNIX timestamp in which the token will expire
getRefreshToken()  : string|null
getRegion()  : string|null
getRegistrationExpiresAt()  : int|null
getStartUrl()  : string|null
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 SSO token object, with the specified AWS token

public __construct(string $token, int $expires[, int $refreshToken = null ][, int $clientId = null ][, int $clientSecret = null ][, int $registrationExpiresAt = null ][, int $region = null ][, int $startUrl = null ]) : mixed
Parameters
$token : string

Security token to use

$expires : int

UNIX timestamp for when the token expires

$refreshToken : int = null

An opaque string returned by the sso-oidc service

$clientId : int = null

The client ID generated when performing the registration portion of the OIDC authorization flow

$clientSecret : int = null

The client secret generated when performing the registration portion of the OIDC authorization flow

$registrationExpiresAt : int = null

The expiration time of the client registration (clientId and clientSecret)

$region : int = null

The configured sso_region for the profile that credentials are being resolved for

$startUrl : int = null

The configured sso_start_url for the profile that credentials are being resolved for

__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

fromTokenData()

Creates an instance of SsoToken from a token data.

public static fromTokenData( $tokenData) : SsoToken
Parameters
$tokenData :
Return values
SsoToken

getClientId()

public getClientId() : string|null
Return values
string|null

getClientSecret()

public getClientSecret() : string|null
Return values
string|null

getExpiration()

Get the UNIX timestamp in which the token will expire

public getExpiration() : int
Return values
int

getRefreshToken()

public getRefreshToken() : string|null
Return values
string|null

getRegion()

public getRegion() : string|null
Return values
string|null

getRegistrationExpiresAt()

public getRegistrationExpiresAt() : int|null
Return values
int|null

getStartUrl()

public getStartUrl() : string|null
Return values
string|null

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