Class ColizeumAuth
Colizeum Authorization module which allows to integrate "Login with Colizeum" functionality easily
Namespace: ColizeumSDK.Auth
Assembly: cs.temp.dll.dll
Syntax
public class ColizeumAuth : MonoBehaviour
Properties
IsLoggedIn
Returns a boolean indicating if the user is logged in
Declaration
public bool IsLoggedIn { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GetAuthUrl()
Returns the authorization url with the code challenge and state
Declaration
public string GetAuthUrl()
Returns
Type | Description |
---|---|
String | URL |
GetTokensFromCode(String, Action<TokenResponse>, Action<Exception>)
Declaration
public void GetTokensFromCode(string code, Action<TokenResponse> onSuccess, Action<Exception> onError = null)
Parameters
Type | Name | Description |
---|---|---|
String | code | |
Action<TokenResponse> | onSuccess | |
Action<Exception> | onError |
GetUser(Action<User>, Action<Exception>)
Returns the currently logged in user
Declaration
public void GetUser(Action<User> onSuccess, Action<Exception> onError = null)
Parameters
Type | Name | Description |
---|---|---|
Action<User> | onSuccess | |
Action<Exception> | onError |
Login(Action<User>, Action<Exception>)
Opens the system's internet browser and starts the login flow
Declaration
public void Login(Action<User> onSuccess, Action<Exception> onError = null)
Parameters
Type | Name | Description |
---|---|---|
Action<User> | onSuccess | Called after a successful login |
Action<Exception> | onError | Called when an exception is thrown within the login flow |
Logout()
Destroys the active Colizeum session, removes all in-memory user data and calls the API to revoke access tokens
Declaration
public void Logout()