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
AuthenticationBuilderThe builder.
Returns
AddLocalApi(AuthenticationBuilder, Action<LocalApiAuthenticationOptions>)
Registers the authentication handler for local APIs.
public static AuthenticationBuilder AddLocalApi(this AuthenticationBuilder builder, Action<LocalApiAuthenticationOptions> configureOptions)
Parameters
builder
AuthenticationBuilderThe builder.
configureOptions
Action<LocalApiAuthenticationOptions>The configure options.
Returns
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
AuthenticationBuilderThe builder.
authenticationScheme
stringThe authentication scheme.
configureOptions
Action<LocalApiAuthenticationOptions>The configure options.
Returns
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
AuthenticationBuilderThe builder.
authenticationScheme
stringThe authentication scheme.
displayName
stringThe display name of this scheme.
configureOptions
Action<LocalApiAuthenticationOptions>The configure options.
Returns
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
IServiceCollectionThe service collection
transformationFunc
Func<ClaimsPrincipal, Task<ClaimsPrincipal>>Function to transform the resulting principal