Class AccessTokenManagementServiceCollectionExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Fdyay.AccessTokenManagement.dll
The entry point a host calls to manage machine-to-machine tokens.
public static class AccessTokenManagementServiceCollectionExtensions
- Inheritance
-
AccessTokenManagementServiceCollectionExtensions
- Inherited Members
Methods
AddClient(IClientCredentialsTokenManagementBuilder, ClientCredentialsClientName, Action<ClientCredentialsClient>)
Registers one client-credentials client under a name.
public static IClientCredentialsTokenManagementBuilder AddClient(this IClientCredentialsTokenManagementBuilder builder, ClientCredentialsClientName name, Action<ClientCredentialsClient> configureClient)
Parameters
builderIClientCredentialsTokenManagementBuildernameClientCredentialsClientNameconfigureClientAction<ClientCredentialsClient>
Returns
AddClientCredentialsTokenHandler(IHttpClientBuilder, ClientCredentialsClientName)
Attaches the named client's token to everything this HTTP client sends.
public static IHttpClientBuilder AddClientCredentialsTokenHandler(this IHttpClientBuilder builder, ClientCredentialsClientName name)
Parameters
builderIHttpClientBuildernameClientCredentialsClientName
Returns
AddClientCredentialsTokenManagement(IServiceCollection)
Adds client-credentials token management.
public static IClientCredentialsTokenManagementBuilder AddClientCredentialsTokenManagement(this IServiceCollection services)
Parameters
servicesIServiceCollection
Returns
Remarks
Safe to call more than once. A host that registers two unrelated outbound hops naturally writes this beside each of them, and the second call must not undo the first.