|
Kanda Foundation 0.2.0
|
Implements a way to log in / log out to Kanda Cloud with OpenID Connect and getting credentials from this process for use in authenticating API requests. More...
Inheritance diagram for ICloudAuthentication:Public Member Functions | |
| Task< CloudCredentials > | GetCredentials (CancellationToken cancellationToken) |
| Gets the current credentials stored for Kanda Cloud. If credentials expire soon, they will be renewed first. | |
| Task< bool > | TryLoginWithSavedCredentials (CancellationToken cancellationToken) |
| Try to login using credentials saved with UserSettingsService. | |
| 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. | |
| Task | Logout () |
| Logs out of Kanda Cloud and clears local credentials. | |
Properties | |
| bool | IsLoggedIn [get] |
| If true, the user is logged in. | |
Events | |
| 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. | |
Implements a way to log in / log out to Kanda Cloud with OpenID Connect and getting credentials from this process for use in authenticating API requests.
| Task< CloudCredentials > GetCredentials | ( | CancellationToken | cancellationToken | ) |
Gets the current credentials stored for Kanda Cloud. If credentials expire soon, they will be renewed first.
Implemented in CloudAuthentication.
| Task Logout | ( | ) |
Logs out of Kanda Cloud and clears local credentials.
Implemented in CloudAuthentication.
| 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.
Implemented in CloudAuthentication.
| Task< bool > TryLoginWithSavedCredentials | ( | CancellationToken | cancellationToken | ) |
Try to login using credentials saved with UserSettingsService.
Implemented in CloudAuthentication.
|
get |
If true, the user is logged in.
Implemented in CloudAuthentication.