Table of Contents

Class SsoTokenUtils

Namespace
Amazon.Runtime.Credentials.Internal
Assembly
AWSSDK.Core.dll
public static class SsoTokenUtils
Inheritance
SsoTokenUtils
Inherited Members

Methods

AsJson(SsoToken)

Serializes the SSO Token to JSON

public static string AsJson(this SsoToken token)

Parameters

token SsoToken

Token to serialize

Returns

string

CanRefresh(SsoToken)

Indicates if token has the necessary data properties to facilitate a refresh attempt.

NOTE: This does NOT check if the token is within a refresh time window. For that, use NeedsRefresh(SsoToken)/
public static bool CanRefresh(this SsoToken token)

Parameters

token SsoToken

Returns

bool

FromJson(string)

Deserializes the SSO Token from JSON

public static SsoToken FromJson(string json)

Parameters

json string

JSON (string) to deserialize

Returns

SsoToken

IsExpired(SsoToken)

True if ExpiresAt is less than the current time

public static bool IsExpired(this SsoToken token)

Parameters

token SsoToken

Returns

bool

NeedsRefresh(SsoToken)

True if either the token will expire in 6 minutes or has already expired.

Per Spec: Always try and refresh an expired token.
public static bool NeedsRefresh(this SsoToken token)

Parameters

token SsoToken

Returns

bool

ToJson(SsoToken)

Serializes the SSO Token to JSON

public static string ToJson(SsoToken token)

Parameters

token SsoToken

Token to serialize

Returns

string