docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BasePkcePlatformSupport

    This class contains platform shared logic to handle the authentication flow.

    Inheritance
    object
    BasePkcePlatformSupport
    ChannelPkcePlatformSupport
    EditorActivatePlatformSupport
    IosPkcePlatformSupport
    WebglActivatePlatformSupport
    WindowsActivatePlatformSupport
    Implements
    IAuthenticationPlatformSupport
    IActivatePlatformSupport
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Identity
    Assembly: Unity.Cloud.Identity.dll
    Syntax
    public class BasePkcePlatformSupport : IAuthenticationPlatformSupport, IActivatePlatformSupport

    Constructors

    BasePkcePlatformSupport(IUrlRedirectionInterceptor, IUrlProcessor, IAppIdProvider, IAppNamespaceProvider, string, string)

    Creates a BasePkcePlatformSupport that handles app activation from an url or key value pairs.

    Declaration
    public BasePkcePlatformSupport(IUrlRedirectionInterceptor urlRedirectionInterceptor, IUrlProcessor urlProcessor, IAppIdProvider appIdProvider, IAppNamespaceProvider appNamespaceProvider, string cacheStorePath, string activationUrl = null)
    Parameters
    Type Name Description
    IUrlRedirectionInterceptor urlRedirectionInterceptor

    An Unity.Cloud.AppLinking.IUrlRedirectionInterceptor that manages url redirection interception.

    IUrlProcessor urlProcessor

    An Unity.Cloud.AppLinking.IUrlProcessor that manages url processing after interception.

    IAppIdProvider appIdProvider

    An Unity.Cloud.Common.IAppIdProvider instance.

    IAppNamespaceProvider appNamespaceProvider

    An Unity.Cloud.Common.IAppNamespaceProvider instance.

    string cacheStorePath

    A full path to a readable/writable directory.

    string activationUrl

    An optional activation URL.

    Fields

    m_LoginUrl

    The url used to initiate a login operation in the default OS browser.

    Declaration
    protected string m_LoginUrl
    Field Value
    Type Description
    string

    m_UrlProcessor

    The Unity.Cloud.AppLinking.IUrlProcessor that manages url processing after interception.

    Declaration
    protected readonly IUrlProcessor m_UrlProcessor
    Field Value
    Type Description
    IUrlProcessor

    Properties

    ActivationKeyValue

    Retrieves the key value pairs used to activate the application.

    Declaration
    public virtual Dictionary<string, string> ActivationKeyValue { get; protected set; }
    Property Value
    Type Description
    Dictionary<string, string>

    ActivationUrl

    Retrieves the URL used to activate the application.

    Declaration
    public virtual string ActivationUrl { get; protected set; }
    Property Value
    Type Description
    string

    CodeVerifierCacheStore

    The code verifier cache store used in authenticated redirection flow.

    Declaration
    public virtual IKeyValueStore CodeVerifierCacheStore { get; }
    Property Value
    Type Description
    IKeyValueStore

    HostUrl

    Retrieves the URL used to activate the application.

    Declaration
    public virtual string HostUrl { get; protected set; }
    Property Value
    Type Description
    string

    SecretCacheStore

    The secret cache store used in authenticated redirection flow.

    Declaration
    public virtual IKeyValueStore SecretCacheStore { get; }
    Property Value
    Type Description
    IKeyValueStore

    UrlRedirectionInterceptor

    The Unity.Cloud.AppLinking.IUrlRedirectionInterceptor monitoring URL redirection requests.

    Declaration
    public virtual IUrlRedirectionInterceptor UrlRedirectionInterceptor { get; }
    Property Value
    Type Description
    IUrlRedirectionInterceptor

    Methods

    ExportServiceAuthorizerToken(string, string)

    Exports the token and its token type used to authorize Service endpoints call.

    Declaration
    public virtual void ExportServiceAuthorizerToken(string type, string token)
    Parameters
    Type Name Description
    string type

    Authorization type for the token (Bearer or Basic).

    string token

    The token string value.

    GetAppStateOverride()

    Gets a string override for the default random state parameter used in authenticated redirection flows.

    Declaration
    public virtual string GetAppStateOverride()
    Returns
    Type Description
    string

    This method returns a string override of the default random state or null if no override is defined.

    GetCancellationUri()

    Gets the cancellation URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    Declaration
    public virtual string GetCancellationUri()
    Returns
    Type Description
    string

    The cancellation URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the app isn't awaiting a URL redirection response.

    GetRedirectUri(string)

    Gets the redirection URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    Declaration
    public virtual string GetRedirectUri(string operation = null)
    Parameters
    Type Name Description
    string operation

    Optional string to append to the path of the redirect URI

    Returns
    Type Description
    string

    The redirection URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    GetRedirectUriAsync(string)

    Gets the redirection URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    Declaration
    public virtual Task<string> GetRedirectUriAsync(string operation = null)
    Parameters
    Type Name Description
    string operation

    Optional string to append to the path of the redirect URI

    Returns
    Type Description
    Task<string>

    The redirection URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(string, List<string>).

    GetRedirectionResult()

    This method returns the Unity.Cloud.AppLinking.UrlRedirectResult captured at app initializing time, or null if none available.

    Declaration
    public virtual UrlRedirectResult? GetRedirectionResult()
    Returns
    Type Description
    UrlRedirectResult?

    The Unity.Cloud.AppLinking.UrlRedirectResult captured at app initializing time, or null if none available on the specific platform.

    OpenUrlAndWaitForRedirectAsync(string, List<string>)

    Creates a pending task that starts by opening a URL in a browser and is completed when response is intercepted, validated and returns a Unity.Cloud.AppLinking.UrlRedirectResult.

    Declaration
    public virtual Task<UrlRedirectResult> OpenUrlAndWaitForRedirectAsync(string url, List<string> awaitedQueryArguments = null)
    Parameters
    Type Name Description
    string url

    The URL to open. It must trigger a redirection to the URI referenced by GetRedirectUri(string).

    List<string> awaitedQueryArguments

    The list of query arguments to validate when receiving the awaited callback url.

    Returns
    Type Description
    Task<UrlRedirectResult>

    A task that results in a Unity.Cloud.AppLinking.UrlRedirectResult when completed.

    Exceptions
    Type Condition
    TimeoutException

    Thrown if no redirect occurred within the allotted time limit.

    ProcessActivationUrl(List<string>)

    Processes activation URL to either complete a URL redirection flow or consume an authenticated app resource.

    Declaration
    public virtual void ProcessActivationUrl(List<string> awaitedQueryArguments = null)
    Parameters
    Type Name Description
    List<string> awaitedQueryArguments

    The list of query arguments to validate when processing the activation URL.

    Implements

    IAuthenticationPlatformSupport
    Unity.Cloud.AppLinking.IActivatePlatformSupport
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)