docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DeviceToken

    Holds the token information related to a user authenticated session.

    Inheritance
    object
    DeviceToken
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)