Interface IMarsIdentity
Defines the API for a MarsIdentity Provider To be used with identity and authentication providers such as OAuth
Namespace: Unity.Labs.MARS
Syntax
public interface IMarsIdentity
Properties
ExtendedIdentityInformation
Get a dictionary containing additional user information Values are populated with JSON deserialization and is not guaranteed to exist
Declaration
Dictionary<string, string> ExtendedIdentityInformation { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<String, String> |
IsValid
Get the current state of the Credential
Declaration
bool IsValid { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | True if the credential is in good standing and within the expiration date, false otherwise. |
Token
Get the current authentication token
Declaration
string Token { get; }
Property Value
| Type | Description |
|---|---|
| String |
Username
Get the associated username
Declaration
string Username { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
SignIn(Action<Boolean>, String, Boolean)
Start the sign-in process
Declaration
IEnumerator SignIn(Action<bool> callback = null, string intent = "", bool onlyCached = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Boolean> | callback | Method to be called on completion |
| String | intent | Species the intent string, for devices that do not support launching with intent (or debugging) |
| Boolean | onlyCached | Only sign in if there is a cached intent--do not open login URL in browser |
Returns
| Type | Description |
|---|---|
| IEnumerator |
SignOut(Action<Boolean>)
Sign out of the account and invalidate the credential
Declaration
IEnumerator SignOut(Action<bool> callback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Boolean> | callback |
Returns
| Type | Description |
|---|---|
| IEnumerator |