Class DeviceToken
Holds the token information related to a user authenticated session.
Inherited Members
Namespace: Unity.Cloud.Identity
Assembly: Unity.Cloud.Identity.dll
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, int)
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. |
int | accessTokenExpiryInSeconds | The int value in seconds of the remaining time before expiratoion of the issued access token. |
DeviceToken(string, string, int, 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. |
int | 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 |