IdentityServerBuilderConfigurationExtensions.AddApiAuthorization 方法

定义

重载

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder)

为标识服务器配置 ASP.NET Core方案的默认值。

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder, Action<ApiAuthorizationOptions>)

在标识服务器上为 ASP.NET Core方案配置默认值。

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder)

Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs

为标识服务器配置 ASP.NET Core方案的默认值。

public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization<TUser,TContext> (this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext;
public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization<TUser,TContext> (this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, Duende.IdentityServer.EntityFramework.Interfaces.IPersistedGrantDbContext;
static member AddApiAuthorization : Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder -> Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder (requires 'User : null and 'Context :> Microsoft.EntityFrameworkCore.DbContext and 'Context :> IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext)
static member AddApiAuthorization : Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder -> Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder (requires 'User : null and 'Context :> Microsoft.EntityFrameworkCore.DbContext and 'Context :> Duende.IdentityServer.EntityFramework.Interfaces.IPersistedGrantDbContext)
<Extension()>
Public Function AddApiAuthorization(Of TUser As Class, TContext As Class) (builder As IIdentityServerBuilder) As IIdentityServerBuilder

类型参数

TUser

TUser 类型。

TContext

TContext 类型。

参数

builder
Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

返回

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

适用于

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder, Action<ApiAuthorizationOptions>)

Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs
Source:
IdentityServerBuilderConfigurationExtensions.cs

在标识服务器上为 ASP.NET Core方案配置默认值。

public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization<TUser,TContext> (this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationOptions> configure) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext;
public static Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder AddApiAuthorization<TUser,TContext> (this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationOptions> configure) where TUser : class where TContext : Microsoft.EntityFrameworkCore.DbContext, Duende.IdentityServer.EntityFramework.Interfaces.IPersistedGrantDbContext;
static member AddApiAuthorization : Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder * Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationOptions> -> Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder (requires 'User : null and 'Context :> Microsoft.EntityFrameworkCore.DbContext and 'Context :> IdentityServer4.EntityFramework.Interfaces.IPersistedGrantDbContext)
static member AddApiAuthorization : Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder * Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationOptions> -> Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder (requires 'User : null and 'Context :> Microsoft.EntityFrameworkCore.DbContext and 'Context :> Duende.IdentityServer.EntityFramework.Interfaces.IPersistedGrantDbContext)
<Extension()>
Public Function AddApiAuthorization(Of TUser As Class, TContext As Class) (builder As IIdentityServerBuilder, configure As Action(Of ApiAuthorizationOptions)) As IIdentityServerBuilder

类型参数

TUser

TUser 类型。

TContext

TContext 类型。

参数

builder
Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

返回

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder

适用于