More...
|
|
| CloudAuthentication (IPlatformSettings platformSettings, ICloudSettings cloudSettings, IUserSettingsService userSettings, IUnityHttpClient httpClient) |
| |
| async Task< CloudCredentials > | GetCredentials (CancellationToken cancellationToken=default) |
| | Gets the current credentials stored for Kanda Cloud. If credentials expire soon, they will be renewed first.
|
| |
| async Task< bool > | TryLoginWithSavedCredentials (CancellationToken cancellationToken) |
| | Try to login using credentials saved with UserSettingsService.- Returns
- True if valid credentials could be found.
|
| |
| async Task< DeviceCodeLoginData > | StartLoginWithDeviceCode (CancellationToken cancellationToken) |
| | Initiates a login process with OpenID Connect using the Device Code grant. Once started, this will continue to poll in the background for device code activation. When the device code is activated or the process is aborted, a OnLogin or OnLoginError event is invoked.- Returns
- Information about the device code flow, like whether it could be successfully started, the user code and activation URL.
|
| |
| async Task | Logout () |
| | Logs out of Kanda Cloud and clears local credentials.
|
| |
|
|
Action< LoginType > | OnLogin |
| |
|
Action | OnLogout |
| |
|
Action< string > | OnLoginError |
| |
|
Action | OnSessionExpired |
| |
Events inherited from ICloudAuthentication |
|
Action< LoginType > | OnLogin |
| | Invoked when a login process has been successfully completed.
|
| |
|
Action | OnLogout |
| | Invoked when a logout process has been successfully completed.
|
| |
|
Action< string > | OnLoginError |
| | Invoked when a login process has completed with an error.
|
| |
|
Action | OnSessionExpired |
| | Invoked when Cloud credentials have expired and cannot be renewed.
|
| |
◆ GetCredentials()
| async Task< CloudCredentials > GetCredentials |
( |
CancellationToken | cancellationToken = default | ) |
|
|
inline |
◆ Logout()
◆ StartLoginWithDeviceCode()
| async Task< DeviceCodeLoginData > StartLoginWithDeviceCode |
( |
CancellationToken | cancellationToken | ) |
|
|
inline |
Initiates a login process with OpenID Connect using the Device Code grant. Once started, this will continue to poll in the background for device code activation. When the device code is activated or the process is aborted, a OnLogin or OnLoginError event is invoked.
- Returns
- Information about the device code flow, like whether it could be successfully started, the user code and activation URL.
Implements ICloudAuthentication.
◆ TryLoginWithSavedCredentials()
| async Task< bool > TryLoginWithSavedCredentials |
( |
CancellationToken | cancellationToken | ) |
|
|
inline |
Try to login using credentials saved with UserSettingsService.
- Returns
- True if valid credentials could be found.
Implements ICloudAuthentication.
◆ IsLoggedIn
The documentation for this class was generated from the following file:
- Runtime/Cloud/Auth/CloudAuthentication.cs