Table of Contents

Class LocalApiAuthenticationExtensions

Namespace
Microsoft.Extensions.DependencyInjection
Assembly
Duende.IdentityServer.dll

Extensions for registering the local access token authentication handler

public static class LocalApiAuthenticationExtensions
Inheritance
LocalApiAuthenticationExtensions
Inherited Members

Methods

AddLocalApi(AuthenticationBuilder)

Registers the authentication handler for local APIs.

public static AuthenticationBuilder AddLocalApi(this AuthenticationBuilder builder)

Parameters

builder AuthenticationBuilder

The builder.

Returns

AuthenticationBuilder

AddLocalApi(AuthenticationBuilder, Action<LocalApiAuthenticationOptions>)

Registers the authentication handler for local APIs.

public static AuthenticationBuilder AddLocalApi(this AuthenticationBuilder builder, Action<LocalApiAuthenticationOptions> configureOptions)

Parameters

builder AuthenticationBuilder

The builder.

configureOptions Action<LocalApiAuthenticationOptions>

The configure options.

Returns

AuthenticationBuilder

AddLocalApi(AuthenticationBuilder, string, Action<LocalApiAuthenticationOptions>)

Registers the authentication handler for local APIs.

public static AuthenticationBuilder AddLocalApi(this AuthenticationBuilder builder, string authenticationScheme, Action<LocalApiAuthenticationOptions> configureOptions)

Parameters

builder AuthenticationBuilder

The builder.

authenticationScheme string

The authentication scheme.

configureOptions Action<LocalApiAuthenticationOptions>

The configure options.

Returns

AuthenticationBuilder

AddLocalApi(AuthenticationBuilder, string, string?, Action<LocalApiAuthenticationOptions>)

Registers the authentication handler for local APIs.

public static AuthenticationBuilder AddLocalApi(this AuthenticationBuilder builder, string authenticationScheme, string? displayName, Action<LocalApiAuthenticationOptions> configureOptions)

Parameters

builder AuthenticationBuilder

The builder.

authenticationScheme string

The authentication scheme.

displayName string

The display name of this scheme.

configureOptions Action<LocalApiAuthenticationOptions>

The configure options.

Returns

AuthenticationBuilder

AddLocalApiAuthentication(IServiceCollection, Func<ClaimsPrincipal, Task<ClaimsPrincipal>>?)

Adds support for local APIs

public static IServiceCollection AddLocalApiAuthentication(this IServiceCollection services, Func<ClaimsPrincipal, Task<ClaimsPrincipal>>? transformationFunc = null)

Parameters

services IServiceCollection

The service collection

transformationFunc Func<ClaimsPrincipal, Task<ClaimsPrincipal>>

Function to transform the resulting principal

Returns

IServiceCollection