ProjectVAuthenticationSnapshot class
The sign-in state the Login scene draws: status, the signed-in player and the last error. Read-only; every change arrives as a new instance.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Authentication
public sealed class ProjectVAuthenticationSnapshot
Constructors​
ProjectVAuthenticationSnapshot(ProjectVAuthenticationStatus status, string? userId, string? username, DateTimeOffset? expiresAt, ProjectVAuthenticationError? error)​
Creates a snapshot. Mostly useful for tests and fake presenters.
public ProjectVAuthenticationSnapshot(ProjectVAuthenticationStatus status, string? userId, string? username, DateTimeOffset? expiresAt, ProjectVAuthenticationError? error);
Parameters
| Name | Type | Description |
|---|---|---|
status | ProjectVAuthenticationStatus | The sign-in status. |
userId | string? | The signed-in player's ID, or null when nobody is signed in. |
username | string? | The signed-in player's display name, or null. |
expiresAt | DateTimeOffset? | When the current sign-in expires, or null. |
error | ProjectVAuthenticationError? | Why the last command failed, or null when it worked. |
Properties​
| Property | Type | Description |
|---|---|---|
Status | ProjectVAuthenticationStatus | Where the player is in sign-in right now. |
UserId | string? | The signed-in player's ID; null unless IsAuthenticated is true. |
Username | string? | The signed-in player's display name; null unless IsAuthenticated is true. |
ExpiresAt | DateTimeOffset? | When the current sign-in expires; null unless IsAuthenticated is true. |
Error | ProjectVAuthenticationError? | Why the last command failed, or null. Can be set while Status is SignedOut, for example when a saved sign-in was no longer accepted. |
IsBusy | bool | True while a command is running; show a spinner and disable the sign-in buttons. |
IsAuthenticated | bool | True when a player is signed in. |