Interface IAuthenticationPlatformSupport
This interface abstracts common handling of platform-specific features in URL redirection flows.
Inherited Members
Namespace: Unity.Cloud.Identity
Assembly: Unity.Cloud.Identity.dll
Syntax
public interface IAuthenticationPlatformSupport : IActivatePlatformSupport
Properties
CodeVerifierCacheStore
The code verifier cache store used in authenticated redirection flow.
Declaration
IKeyValueStore CodeVerifierCacheStore { get; }
Property Value
Type | Description |
---|---|
IKeyValueStore |
SecretCacheStore
The secret cache store used in authenticated redirection flow.
Declaration
IKeyValueStore SecretCacheStore { get; }
Property Value
Type | Description |
---|---|
IKeyValueStore |
UrlRedirectionInterceptor
The Unity.Cloud.AppLinking.IUrlRedirectionInterceptor monitoring URL redirection requests.
Declaration
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
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
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
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
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
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
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
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
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. |