Class AccountHandler
Handler in charge of taking care of any Account or portal related operations. Offers an easy to use access login and profile handling system.
Inherited Members
Namespace: Appearition.AccountAndAuthentication
Assembly: Appearition.SDK.dll
Syntax
public sealed class AccountHandler : BaseHandler
Methods
View SourceCheckRegistrationStatus(String, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Checks the registration status of a specific user to find out whether the account is successfully registered, locked and/or verified.
Declaration
public static void CheckRegistrationStatus(string username, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
CheckRegistrationStatusProcess(String, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Checks the registration status of a specific user to find out whether the account is successfully registered, locked and/or verified.
Declaration
public static IEnumerator CheckRegistrationStatusProcess(string username, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
FetchAvailableOAuthClientTypes(Action<List<OAuthClient>>, Action<EmsError>, Action<Boolean>)
Declaration
public static void FetchAvailableOAuthClientTypes(Action<List<OAuthClient>> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Collections.Generic.List<OAuthClient>> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
FetchAvailableOAuthClientTypes(Int32, Action<List<OAuthClient>>, Action<EmsError>, Action<Boolean>)
Declaration
public static void FetchAvailableOAuthClientTypes(int channelId, Action<List<OAuthClient>> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
System.Action<System.Collections.Generic.List<OAuthClient>> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
FetchAvailableOAuthClientTypesProcess(Action<List<OAuthClient>>, Action<EmsError>, Action<Boolean>)
Declaration
public static IEnumerator FetchAvailableOAuthClientTypesProcess(Action<List<OAuthClient>> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.Collections.Generic.List<OAuthClient>> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
FetchAvailableOAuthClientTypesProcess(Int32, Action<List<OAuthClient>>, Action<EmsError>, Action<Boolean>)
Declaration
public static IEnumerator FetchAvailableOAuthClientTypesProcess(int channelId, Action<List<OAuthClient>> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
System.Action<System.Collections.Generic.List<OAuthClient>> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
FetchOAuthClientUri(OAuthClient, Action<String>, Action<EmsError>, Action<Boolean>)
Declaration
public static void FetchOAuthClientUri(OAuthClient selectedClient, Action<string> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
OAuthClient | selectedClient | |
System.Action<System.String> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
FetchOAuthClientUri(Int32, OAuthClient, Action<String>, Action<EmsError>, Action<Boolean>)
Declaration
public static void FetchOAuthClientUri(int channelId, OAuthClient selectedClient, Action<string> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
OAuthClient | selectedClient | |
System.Action<System.String> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
FetchOAuthClientUriProcess(OAuthClient, Action<String>, Action<EmsError>, Action<Boolean>)
Declaration
public static IEnumerator FetchOAuthClientUriProcess(OAuthClient selectedClient, Action<string> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
OAuthClient | selectedClient | |
System.Action<System.String> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
FetchOAuthClientUriProcess(Int32, OAuthClient, Action<String>, Action<EmsError>, Action<Boolean>)
Declaration
public static IEnumerator FetchOAuthClientUriProcess(int channelId, OAuthClient selectedClient, Action<string> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
OAuthClient | selectedClient | |
System.Action<System.String> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
GetProfileData(Action<ExtendedProfile>, Action<EmsError>, Action<Boolean>)
Fetches all the information related to the profile of a logged in user.
API Requirement: Application Token.
Declaration
public static void GetProfileData(Action<ExtendedProfile> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ExtendedProfile> | onSuccess | Contains the profile data as on the EMS. Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
GetProfileDataProcess(Action<ExtendedProfile>, Action<EmsError>, Action<Boolean>)
Fetches all the information related to the profile of a logged in user.
API Requirement: Application Token.
Declaration
public static IEnumerator GetProfileDataProcess(Action<ExtendedProfile> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<ExtendedProfile> | onSuccess | Contains the profile data as on the EMS. Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
GetRegisteredUserProfileData(Action<UserProfile>, Action<EmsError>, Action<Boolean>)
Fetches all the information related to the profile of a logged in user targeting a FloAR-like EMS structure.
API Requirement: Anonymous Token.
Declaration
public static void GetRegisteredUserProfileData(Action<UserProfile> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<UserProfile> | onSuccess | Contains the user profile information as on the EMS. Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
GetRegisteredUserProfileDataProcess(Action<UserProfile>, Action<EmsError>, Action<Boolean>)
Fetches all the information related to the profile of a logged in user targeting a FloAR-like EMS structure.
API Requirement: Anonymous Token.
Declaration
public static IEnumerator GetRegisteredUserProfileDataProcess(Action<UserProfile> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<UserProfile> | onSuccess | Contains the user profile information as on the EMS. Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Login(String, String, Action, Action<EmsError>, Action<Boolean>)
Tries to login to the EMS with the credentials stored in the current profile. Do note that this is an optional step to access other requests.
API Requirement: Application Token.
Declaration
public static void Login(string username, string password, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username entered by the user. |
System.String | password | The password entered by the user. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
LoginProcess(String, String, Action, Action<EmsError>, Action<Boolean>)
Tries to login to the EMS with the credentials stored in the current profile. Do note that this is an optional step to access other requests.
API Requirement: Application Token.
Declaration
public static IEnumerator LoginProcess(string username, string password, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username entered by the user. |
System.String | password | The password entered by the user. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Logout(Boolean, Action, Action<EmsError>, Action<Boolean>)
Using the information stored in the current user and its session token, ends the current session with the EMS and resets token to its global one.
API Requirement: Session Token.
Declaration
public static void Logout(bool revertUserToDefault, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | revertUserToDefault | Whether or not all the |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
LogoutProcess(Boolean, Action, Action<EmsError>, Action<Boolean>)
Using the information stored in the current user and its session token, ends the current session with the EMS and resets token to its global one.
API Requirement: Session Token.
Declaration
public static IEnumerator LogoutProcess(bool revertUserToDefault, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | revertUserToDefault | |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
OAuthCallbackProcess(Int32, String, Action<String>, Action<EmsError>, Action<Boolean>)
Declaration
public static IEnumerator OAuthCallbackProcess(int channelId, string content, Action<string> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
System.String | content | |
System.Action<System.String> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
RegisterDevice(String, String, Action, Action<EmsError>, Action<Boolean>)
A login method targeting a FloAR-like EMS structure.
API Requirement: Anonymous Token.
Declaration
public static void RegisterDevice(string username, string password, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username entered by the user. |
System.String | password | The password entered by the user. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
RegisterDeviceProcess(String, String, Action, Action<EmsError>, Action<Boolean>)
A login method targeting a FloAR-like EMS structure.
API Requirement: Anonymous Token.
Declaration
public static IEnumerator RegisterDeviceProcess(string username, string password, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username entered by the user. |
System.String | password | The password entered by the user. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
SubmitPasswordResetRequest(String, Action, Action<EmsError>, Action<Boolean>)
Submits a password reset request to the EMS with a given username.
Declaration
public static void SubmitPasswordResetRequest(string username, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.Action | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
SubmitPasswordResetRequestProcess(String, Action, Action<EmsError>, Action<Boolean>)
Submits a password reset request to the EMS with a given username.
Declaration
public static IEnumerator SubmitPasswordResetRequestProcess(string username, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | |
System.Action | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
SubmitRegistration(RegistrationForm, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Begin the first part of the registration process. Submits a form to the EMS containing all the information required to create a new account.
Declaration
public static void SubmitRegistration(RegistrationForm form, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
RegistrationForm | form | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
SubmitRegistration(Int32, RegistrationForm, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Begin the first part of the registration process. Submits a form to the EMS containing all the information required to create a new account.
Declaration
public static void SubmitRegistration(int channelId, RegistrationForm form, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
RegistrationForm | form | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
SubmitRegistrationProcess(RegistrationForm, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Begin the first part of the registration process. Submits a form to the EMS containing all the information required to create a new account.
Declaration
public static IEnumerator SubmitRegistrationProcess(RegistrationForm form, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
RegistrationForm | form | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
SubmitRegistrationProcess(Int32, RegistrationForm, Action<AccountStatus>, Action<EmsError>, Action<Boolean>)
Begin the first part of the registration process. Submits a form to the EMS containing all the information required to create a new account.
Declaration
public static IEnumerator SubmitRegistrationProcess(int channelId, RegistrationForm form, Action<AccountStatus> onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | channelId | |
RegistrationForm | form | |
System.Action<AccountStatus> | onSuccess | |
System.Action<EmsError> | onFailure | |
System.Action<System.Boolean> | onComplete |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
UpdateProfileSettings(Profile, Action, Action<EmsError>, Action<Boolean>)
Updates the information of the logged in user. Should be used to update name, email or any custom attribute. If wanting to remove an attribute, do set said attribute doDeleteAttribute to true.
API Requirement: Application Token.
Declaration
public static void UpdateProfileSettings(Profile profileData, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
Profile | profileData | The user's profile as on the EMS. Can be fetched using GetProfileData. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
UpdateProfileSettingsProcess(Profile, Action, Action<EmsError>, Action<Boolean>)
Updates the information of the logged in user. Should be used to update name, email or any custom attribute. If wanting to remove an attribute, do set said attribute doDeleteAttribute to true.
API Requirement: Application Token.
Declaration
public static IEnumerator UpdateProfileSettingsProcess(Profile profileData, Action onSuccess = null, Action<EmsError> onFailure = null, Action<bool> onComplete = null)
Parameters
Type | Name | Description |
---|---|---|
Profile | profileData | The user's profile as on the EMS. Can be fetched using GetProfileData. |
System.Action | onSuccess | Only called if the request is successful. |
System.Action<EmsError> | onFailure | Contains any error obtained during the request. Only called if the request has failed. |
System.Action<System.Boolean> | onComplete | Always called at the end of the request, defines whether the request was successful or not. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |