Class AccessTokenRefreshService
Default implementation of IAccessTokenRefreshService.
public class AccessTokenRefreshService : IAccessTokenRefreshService- Inheritance
- 
      
      AccessTokenRefreshService
- Implements
- Inherited Members
Constructors
AccessTokenRefreshService(IOidcConfig, IHttpClientFactory, string?, IClock?, IJwksStore)
Initializes a new instance of the class.
public AccessTokenRefreshService(IOidcConfig config, IHttpClientFactory httpClientFactory, string? httpClientName, IClock? clock, IJwksStore jwksStore)Parameters
- configIOidcConfig
- The OpenID Connect settings. 
- httpClientFactoryIHttpClientFactory
- Factory to create HttpClient instances. 
- httpClientNamestring
- Optional name for the HttpClient to use for Open ID Connect related HTTP requests. 
- clockIClock
- Optional testable wrapper for system clock. 
- jwksStoreIJwksStore
Methods
RefreshAsync(TokenResponse)
Refreshes the current token using the refresh token.
public Task<TokenResponse?> RefreshAsync(TokenResponse currentToken)Parameters
- currentTokenTokenResponse
- Current token from previous authentication. 
Returns
- Task<TokenResponse>
- A new token. 
Exceptions
- ArgumentNullException
- currentTokenwas- null.