Interface IClientCredentialsTokenService
- Namespace
- Fdyay.AccessTokenManagement
- Assembly
- Fdyay.AccessTokenManagement.dll
Obtains and caches client-credentials access tokens.
public interface IClientCredentialsTokenService
Methods
Evict(ClientCredentialsClientName)
Discards the cached token, so the next request obtains a fresh one.
void Evict(ClientCredentialsClientName clientName)
Parameters
clientNameClientCredentialsClientName
Remarks
For the case the cache cannot see: a resource server rejecting a token this client still believes in — revoked, or signed by a key that has rotated.
GetAccessTokenAsync(ClientCredentialsClientName, CancellationToken)
The current token for a registered client, obtaining one if the cache cannot serve it.
Task<ClientCredentialsToken> GetAccessTokenAsync(ClientCredentialsClientName clientName, CancellationToken cancellationToken = default)
Parameters
clientNameClientCredentialsClientNamecancellationTokenCancellationToken