ITenantTokenProvider
Namespace: Meshmakers.Octo.Sdk.ServiceClient.Authentication
Exchanges the token a client is signed in with for a token issued for another tenant (RFC 8693) and caches it per tenant.
public interface ITenantTokenProvider
Methods
GetAccessTokenAsync(String, String, CancellationToken)
Returns an access token issued for targetTenantId. Re-exchanges silently from
subjectToken when the cached token is missing, about to expire or was
obtained from another subject token.
Task<string> GetAccessTokenAsync(string targetTenantId, string subjectToken, CancellationToken cancellationToken)
Parameters
targetTenantId String
The tenant to address.
subjectToken String
The token the caller is signed in with.
cancellationToken CancellationToken
Cancellation token.
Returns
Exceptions
TenantTokenExchangeDeniedException
No token could be obtained. Never falls back to the subject token.