Class EditorPkcePlatformSupport
This class handles Unity Editor platform-specific features in the authentication flow.
Inherited Members
Namespace: Unity.Cloud.Identity.Runtime
Syntax
public class EditorPkcePlatformSupport : EditorActivatePlatformSupport, IAuthenticationPlatformSupport, IActivatePlatformSupport
Constructors
EditorPkcePlatformSupport(IUrlRedirectionInterceptor, IUrlProcessor, IAppIdProvider, IAppNameProvider, String, String)
Creates a EditorPkcePlatformSupport instance using an IUrlRedirectionInterceptor.
Declaration
public EditorPkcePlatformSupport(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 |
Methods
GetCancellationUri()
Gets 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
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 override 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>). |
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 a pending task that starts by opening a URL in a browser and is completed when response 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
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 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. |