Show / Hide Table of Contents

Class UserProfile

Basic user that contains all the ApiData for storing purpose.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.ScriptableObject
UserProfile
Inherited Members
UnityEngine.ScriptableObject.SetDirty()
UnityEngine.ScriptableObject.CreateInstance(System.String)
UnityEngine.ScriptableObject.CreateInstance(System.Type)
UnityEngine.ScriptableObject.CreateInstance<T>()
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(System.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Appearition.Profile
Assembly: Appearition.SDK.dll
Syntax
[Serializable]
[CreateAssetMenu(menuName = "Appearition/Create Basic User")]
public class UserProfile : ScriptableObject

Fields

View Source

allTenantsAvailable

Contains all the tenants available for this profile. Do note that by default, it only contains the selected tenant. If you want to see all tenants, trigger the AccountHandler.GetProfileData() request, and this list will be refreshed upon completion.

Declaration
public List<TenantData> allTenantsAvailable
Field Value
Type Description
System.Collections.Generic.List<TenantData>
View Source

applicationToken

EMS portal token. Can be found on the portal under Settings>Developer after selecting a tenant.

Declaration
public string applicationToken
Field Value
Type Description
System.String
View Source

authenticationTokens

Contains all the tokens currently active on this profile. If your application uses external cloud authentication with other tokens, feel free to store them here with a key of your choice.

Declaration
public Dictionary<string, string> authenticationTokens
Field Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>
View Source

emailAddress

Declaration
public string emailAddress
Field Value
Type Description
System.String
View Source

firstName

Declaration
public string firstName
Field Value
Type Description
System.String
View Source

lastName

Declaration
public string lastName
Field Value
Type Description
System.String
View Source

nickname

Nickname that can be used for profile selection.

Declaration
public string nickname
Field Value
Type Description
System.String
View Source

selectedChannel

The product ID selected by the user. This corresponds to the channel ID.

Declaration
public int selectedChannel
Field Value
Type Description
System.Int32
View Source

selectedEndPointName

Storage for the end point URL. Also used to fetch the selected end point.

Declaration
public string selectedEndPointName
Field Value
Type Description
System.String
View Source

selectedTenant

The tenant index selected by the user.

Declaration
public string selectedTenant
Field Value
Type Description
System.String
View Source

username

User main ID. Often is the same as user email.

Declaration
public string username
Field Value
Type Description
System.String

Properties

View Source

GetHighestLevelAuthenticationToken

Fetches the most relevant Authentication Token, regardless the user's login state.

Declaration
public string GetHighestLevelAuthenticationToken { get; }
Property Value
Type Description
System.String
View Source

IsUserLoggedIn

Defines whether or not the user has logged in and is in the middle of a session.

Declaration
public bool IsUserLoggedIn { get; }
Property Value
Type Description
System.Boolean
View Source

SelectedEndPoint

Returns the user-selected end point URL.

Declaration
public EndPoint SelectedEndPoint { get; }
Property Value
Type Description
EndPoint

The selected end point.

View Source

SessionToken

Session Token, used by a logged-in user to execute requests which require a higher level of authentication.

Declaration
public string SessionToken { get; }
Property Value
Type Description
System.String

Methods

View Source

AddOrModifyAuthenticationToken(String, String)

Adds or creates a token entry based on a token name (key) and a token value (authentication token).

Declaration
public void AddOrModifyAuthenticationToken(string tokenName, string token)
Parameters
Type Name Description
System.String tokenName
System.String token
View Source

ContainsRoleForSelectedTenant(String)

Whether this authenticated user has a given role.

Declaration
public bool ContainsRoleForSelectedTenant(string role)
Parameters
Type Name Description
System.String role
Returns
Type Description
System.Boolean
View Source

CreateCopy<T>(UserProfile)

Pseudo copy constructor. Creates a runtime copy from a given user profile.

Declaration
public static T CreateCopy<T>(UserProfile cc)
    where T : UserProfile
Parameters
Type Name Description
UserProfile cc
Returns
Type Description
T
Type Parameters
Name Description
T
View Source

GetAuthenticationHeaders(AuthenticationOverrideType, BaseApi)

Gets the authentication headers for WebRequest used during API calls according to user-selected way of authentication.

Declaration
public Dictionary<string, string> GetAuthenticationHeaders(AuthenticationOverrideType requiredType, BaseApi requestSample = null)
Parameters
Type Name Description
AuthenticationOverrideType requiredType
BaseApi requestSample
Returns
Type Description
System.Collections.Generic.Dictionary<System.String, System.String>

The get authentication headers.

View Source

GetAvailableRolesForSelectedTenant()

Returns a list of all the roles this authenticated user has access to in the current tenant.

Declaration
public List<string> GetAvailableRolesForSelectedTenant()
Returns
Type Description
System.Collections.Generic.List<System.String>
View Source

RemoveTokenByNameIfExisting(String)

Tries to find an entry with a matching token key (not the actual token, but the dictionary key), and removes it.

Declaration
public void RemoveTokenByNameIfExisting(string tokenKey)
Parameters
Type Name Description
System.String tokenKey
View Source

RemoveTokenByValueIfExisting(String)

Tries to find a matching token in the currently loaded tokens and remove said entry.

Declaration
public void RemoveTokenByValueIfExisting(string token)
Parameters
Type Name Description
System.String token

Extension Methods

ObjectExtension.ToStream(Object)
  • View Source
Back to top Generated by DocFX