Class WebglPkcePlatformSupport
This class handles WebGL platform-specific features in the authentication flow.
Inherited Members
Namespace: Unity.Cloud.Identity.Runtime
Syntax
public class WebglPkcePlatformSupport : WebglActivatePlatformSupport, IAuthenticationPlatformSupport, IActivatePlatformSupport
Constructors
WebglPkcePlatformSupport(IUrlRedirectionInterceptor, IUrlProcessor, IAppIdProvider, IAppNameProvider, String, String)
Creates a WebglPkcePlatformSupport instance using an IUrlRedirectionInterceptor.
Declaration
public WebglPkcePlatformSupport(IUrlRedirectionInterceptor urlRedirectionInterceptor, IUrlProcessor urlProcessor, IAppIdProvider appIdProvider, IAppNameProvider appNameProvider, string cacheStorePath, string activationUrl = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IUrlRedirectionInterceptor | urlRedirectionInterceptor | The IUrlRedirectionInterceptor that will intercept the authentication response sent after completing a login operation in browser. |
| IUrlProcessor | urlProcessor | |
| IAppIdProvider | appIdProvider | |
| IAppNameProvider | appNameProvider | |
| String | cacheStorePath | |
| String | activationUrl |
Properties
CodeVerifierCacheStore
The code verifier cache store.
Declaration
public override IKeyValueStore CodeVerifierCacheStore { get; }
Property Value
| Type | Description |
|---|---|
| IKeyValueStore |
Overrides
SecretCacheStore
The secret cache store.
Declaration
public override IKeyValueStore SecretCacheStore { get; }
Property Value
| Type | Description |
|---|---|
| IKeyValueStore |
Overrides
Methods
ExportServiceAuthorizerToken(String, String)
Exports the token and its token type used to authorize Service endpoints call.
Declaration
public override 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. |
Overrides
GetCancellationUri()
Get the cancellation Uri expected from the browser when calling OpenUrlAndWaitForRedirectAsync(String, List<String>).
Declaration
public override string GetCancellationUri()
Returns
| Type | Description |
|---|---|
| String | The cancellation Uri expected from the browser when calling OpenUrlAndWaitForRedirectAsync(String, List<String>). |
Overrides
GetRedirectionResult()
On WebGL this method will return the UrlRedirectResult captured at app initializing time, or null if none available.
Declaration
public override UrlRedirectResult? GetRedirectionResult()
Returns
| Type | Description |
|---|---|
| Nullable<UrlRedirectResult> | The UrlRedirectResult captured at app initializing time, or null if none available. |
Overrides
GetRedirectUri(String)
Get the redirection Uri expected from the browser when calling OpenUrlAndWaitForRedirectAsync(String, List<String>).
Declaration
public override string GetRedirectUri(string operation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | operation |
Returns
| Type | Description |
|---|---|
| String | The redirection Uri expected from the browser when calling OpenUrlAndWaitForRedirectAsync(String, List<String>). |
Overrides
GetRedirectUriAsync(String)
Gets the redirection URI expected from the browser when calling OpenUrlAndWaitForRedirectAsync(String, List<String>).
Declaration
public override 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>). |
Overrides
OpenUrlAndWaitForRedirectAsync(String, List<String>)
Creates an awaitable Task that opens an url in a browser and completes when WebGL host page is reloaded and login is intercepted, validated and returns a UrlRedirectResult.
Declaration
public override async 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 UrlRedirectResult when completed. |
Overrides
ProcessActivationUrl(List<String>)
Process activation url to complete login or consume an authenticated app resource.
Declaration
public override 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. |