Table of Contents

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

builder IClientCredentialsTokenManagementBuilder
name ClientCredentialsClientName
configureClient Action<ClientCredentialsClient>

Returns

IClientCredentialsTokenManagementBuilder

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

builder IHttpClientBuilder
name ClientCredentialsClientName

Returns

IHttpClientBuilder

AddClientCredentialsTokenManagement(IServiceCollection)

Adds client-credentials token management.

public static IClientCredentialsTokenManagementBuilder AddClientCredentialsTokenManagement(this IServiceCollection services)

Parameters

services IServiceCollection

Returns

IClientCredentialsTokenManagementBuilder

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.