|
| | RefreshableCloudCredentials (IPlatformSettings platformSettings, ICloudSettings cloudSettings, CloudCredentials initialCredentials, IUnityHttpClient httpClient) |
| | Creates an instance capable of refreshing underlying credentials.
|
| |
| CloudCredentials | Get () |
| | Gets the current cloud credentials.
|
| |
| async Task | Refresh (CancellationToken cancellationToken) |
| | Refreshes credentials using the OIDC token endpoint.- Exceptions
-
| ArgumentException | Thrown if the current credentials don't have a valid refresh token. |
| InvalidOperationException | Thrown if the token refresh request failed. |
| JsonException | Thrown if the token refresh request content could not be deserialized. |
|
| |
| async Task | RefreshIfExpiring (CancellationToken cancellationToken) |
| | Refreshes credentials using the OIDC token endpoint if the token is expired or will soon.- Exceptions
-
| ArgumentException | Thrown if the current credentials don't have a valid refresh token. |
| InvalidOperationException | Thrown if the token refresh request failed. |
| JsonException | Thrown if the token refresh request content could not be deserialized. |
|
| |
◆ RefreshableCloudCredentials()
Creates an instance capable of refreshing underlying credentials.
- Parameters
-
| platformSettings | |
| initialCredentials | The credentials to use as a starting point, which will subsequently be refreshed. |
| httpClient | Performs the token refresh request. |
◆ Get()
◆ Refresh()
| async Task Refresh |
( |
CancellationToken | cancellationToken | ) |
|
|
inline |
Refreshes credentials using the OIDC token endpoint.
- Exceptions
-
| ArgumentException | Thrown if the current credentials don't have a valid refresh token. |
| InvalidOperationException | Thrown if the token refresh request failed. |
| JsonException | Thrown if the token refresh request content could not be deserialized. |
Implements IRefreshableCloudCredentials.
◆ RefreshIfExpiring()
| async Task RefreshIfExpiring |
( |
CancellationToken | cancellationToken | ) |
|
|
inline |
Refreshes credentials using the OIDC token endpoint if the token is expired or will soon.
- Exceptions
-
| ArgumentException | Thrown if the current credentials don't have a valid refresh token. |
| InvalidOperationException | Thrown if the token refresh request failed. |
| JsonException | Thrown if the token refresh request content could not be deserialized. |
Implements IRefreshableCloudCredentials.
The documentation for this class was generated from the following file:
- Runtime/Cloud/Auth/RefreshableCloudCredentials.cs