Kanda Foundation 0.2.0
Loading...
Searching...
No Matches
RefreshableCloudCredentials Class Reference
+ Inheritance diagram for RefreshableCloudCredentials:

Public Member Functions

 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
ArgumentExceptionThrown if the current credentials don't have a valid refresh token.
InvalidOperationExceptionThrown if the token refresh request failed.
JsonExceptionThrown 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
ArgumentExceptionThrown if the current credentials don't have a valid refresh token.
InvalidOperationExceptionThrown if the token refresh request failed.
JsonExceptionThrown if the token refresh request content could not be deserialized.

 

Constructor & Destructor Documentation

◆ RefreshableCloudCredentials()

RefreshableCloudCredentials ( IPlatformSettings platformSettings,
ICloudSettings cloudSettings,
CloudCredentials initialCredentials,
IUnityHttpClient httpClient )
inline

Creates an instance capable of refreshing underlying credentials.

Parameters
platformSettings
initialCredentialsThe credentials to use as a starting point, which will subsequently be refreshed.
httpClientPerforms the token refresh request.

Member Function Documentation

◆ Get()

CloudCredentials Get ( )
inline

Gets the current cloud credentials.

Implements IRefreshableCloudCredentials.

◆ Refresh()

async Task Refresh ( CancellationToken cancellationToken)
inline

Refreshes credentials using the OIDC token endpoint.

Exceptions
ArgumentExceptionThrown if the current credentials don't have a valid refresh token.
InvalidOperationExceptionThrown if the token refresh request failed.
JsonExceptionThrown 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
ArgumentExceptionThrown if the current credentials don't have a valid refresh token.
InvalidOperationExceptionThrown if the token refresh request failed.
JsonExceptionThrown if the token refresh request content could not be deserialized.

Implements IRefreshableCloudCredentials.


The documentation for this class was generated from the following file: