Class AuthenticationResponse
Response for an authentication request.
Inherited Members
Namespace: Unity.Services.Apis.PlayerAuthentication
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "AuthenticationResponse")]
[Preserve]
public class AuthenticationResponse
Constructors
AuthenticationResponse(int, string, string, string, Player, string)
Initializes a new instance of the Authentication
Declaration
[Preserve]
public AuthenticationResponse(int expiresIn = 0, string idToken = null, string sessionToken = null, string lastNotificationDate = null, Player user = null, string userId = null)
Parameters
Type | Name | Description |
---|---|---|
int | expiresIn | The number of seconds in which the Id token expires. By default it's 3600. (required). |
string | idToken | The Id token of the authenticated player. (required). |
string | sessionToken | The session token of the authenticated player. This token can be used to sign-in the player again.. |
string | lastNotificationDate | When the player received last notification in unix timestamp.. |
Player | user | user (required). |
string | userId | The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player. (required). |
Properties
ExpiresIn
The number of seconds in which the Id token expires. By default it's 3600.
Declaration
[DataMember(Name = "expiresIn", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public int ExpiresIn { get; set; }
Property Value
Type | Description |
---|---|
int | The number of seconds in which the Id token expires. By default it's 3600. |
IdToken
The Id token of the authenticated player.
Declaration
[DataMember(Name = "idToken", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string IdToken { get; set; }
Property Value
Type | Description |
---|---|
string | The Id token of the authenticated player. |
LastNotificationDate
When the player received last notification in unix timestamp.
Declaration
[DataMember(Name = "lastNotificationDate", EmitDefaultValue = false)]
[Preserve]
public string LastNotificationDate { get; set; }
Property Value
Type | Description |
---|---|
string | When the player received last notification in unix timestamp. |
SessionToken
The session token of the authenticated player. This token can be used to sign-in the player again.
Declaration
[DataMember(Name = "sessionToken", EmitDefaultValue = false)]
[Preserve]
public string SessionToken { get; set; }
Property Value
Type | Description |
---|---|
string | The session token of the authenticated player. This token can be used to sign-in the player again. |
User
Gets or Sets User
Declaration
[DataMember(Name = "user", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public Player User { get; set; }
Property Value
Type | Description |
---|---|
Player |
UserId
The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player.
Declaration
[DataMember(Name = "userId", IsRequired = true, EmitDefaultValue = true)]
[Preserve]
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
string | The Id of the authenticated player. If a project is specified in the request, this field represents the Id of the project scoped player. |