AT&T API Platform SDK for Microsoft®  2.3.3
Wrapper classes that allow developers to build robust applications using .NET
 All Classes Namespaces Functions Enumerations Properties
ATT_MSSDK.OAuthToken Class Reference

Encapsulates OAuth token data and parsing. More...

List of all members.

Classes

class  OAuthTokenRaw
 Internal class used for JSON deserialization.

Public Member Functions

 OAuthToken ()
 Initializes a new instance of the OAuthToken class.
 OAuthToken (string accessToken, string refreshToken, string expiresIn)
 Initializes a new instance of the OAuthToken class.
override string ToString ()
 Returns the string version of the OAuthToken object.
bool IsExpired ()
 Checks the access token for expiration.

Static Public Member Functions

static OAuthToken ParseJSON (string jsonInput)
 Creates an OAuthToken from a JSON string.

Properties

string AccessToken [get]
 Gets the access token value.
string RefreshToken [get]
 Gets the refresh token value.
DateTime Expiration [get]
 Gets the expiration time of this access token.
DateTime CreationTime [get]
 Gets the creation time of this access token.
long ExpiresIn [get]
 Gets the number of seconds until the access token expires.

Detailed Description

Encapsulates OAuth token data and parsing.


Constructor & Destructor Documentation

Initializes a new instance of the OAuthToken class.

ATT_MSSDK.OAuthToken.OAuthToken ( string  accessToken,
string  refreshToken,
string  expiresIn 
)

Initializes a new instance of the OAuthToken class.

Parameters:
accessTokenAccess token value returned by the server.
refreshTokenRefresh token value returned by the server.
expiresInNumber of seconds until the access token expires.
Exceptions:
ArgumentExceptionThrown if headers are null, empty, or invalid.

Member Function Documentation

Checks the access token for expiration.

Returns:
true if the access token has expired.
static OAuthToken ATT_MSSDK.OAuthToken.ParseJSON ( string  jsonInput) [static]

Creates an OAuthToken from a JSON string.

Parameters:
jsonInputThe JSON string to parse.
Returns:
An OAuthToken.
override string ATT_MSSDK.OAuthToken.ToString ( )

Returns the string version of the OAuthToken object.

Returns:
Formated AuthToken

Property Documentation

Gets the access token value.

Gets the creation time of this access token.

Gets the expiration time of this access token.

Gets the number of seconds until the access token expires.

Gets the refresh token value.