Class DeviceToken
Holds the token information related to a user authenticated session.
Inherited Members
Namespace: Unity.Cloud.Identity
Syntax
public class DeviceToken
Constructors
DeviceToken(String, String, DateTime)
Creates a DeviceToken.
Declaration
public DeviceToken(string accessToken, string refreshToken, DateTime accessTokenExpiryDateTime)
Parameters
| Type | Name | Description |
|---|---|---|
| String | accessToken | The string value of the issued access token. |
| String | refreshToken | The string value of the issued refresh token. |
| DateTime | accessTokenExpiryDateTime | The DateTime value of the expiry date of the issued access token. |
DeviceToken(String, String, DateTime, String)
Creates a DeviceToken.
Declaration
public DeviceToken(string accessToken, string refreshToken, DateTime accessTokenExpiryDateTime, string oldRefreshToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | accessToken | The string value of the issued access token. |
| String | refreshToken | The string value of the issued refresh token. |
| DateTime | accessTokenExpiryDateTime | The DateTime value of the expiry date of the issued access token. |
| String | oldRefreshToken | The string value of the previously issued refresh token. This value will be used if provided refreshToken is null or empty. |
DeviceToken(String, String, Int32)
Creates a DeviceToken.
Declaration
public DeviceToken(string accessToken, string refreshToken, int accessTokenExpiryInSeconds)
Parameters
| Type | Name | Description |
|---|---|---|
| String | accessToken | The string value of the issued access token. |
| String | refreshToken | The string value of the issued refresh token. |
| Int32 | accessTokenExpiryInSeconds | The int value in seconds of the remaining time before expiratoion of the issued access token. |
DeviceToken(String, String, Int32, String)
Creates a DeviceToken.
Declaration
public DeviceToken(string accessToken, string refreshToken, int accessTokenExpiryInSeconds, string oldRefreshToken)
Parameters
| Type | Name | Description |
|---|---|---|
| String | accessToken | The string value of the issued access token. |
| String | refreshToken | The string value of the issued refresh token. |
| Int32 | accessTokenExpiryInSeconds | The int value in seconds of the remaining time before expiratoion of the issued access token. |
| String | oldRefreshToken | The string value of the previously issued refresh token. This value will be used if provided refreshToken is null or empty. |
Properties
AccessToken
Requests authenticated access to cloud endpoints.
Declaration
public string AccessToken { get; }
Property Value
| Type | Description |
|---|---|
| String |
AccessTokenExpiresIn
The TimeSpan value before the current DeviceToken expires.
Declaration
public TimeSpan AccessTokenExpiresIn { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan |
RefreshToken
The token used on the refresh token cloud endpoint to generate a new DeviceToken.
Declaration
public string RefreshToken { get; }
Property Value
| Type | Description |
|---|---|
| String |