共用方式為


IdentityServerBuilderConfigurationExtensions.AddApiAuthorization 方法

定義

多載

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder)

針對 ASP.NET Core案例,設定 Identity Server 的預設值。

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

針對 ASP.NET Core案例,在身分識別伺服器上設定預設值。

AddApiAuthorization<TUser,TContext>(IIdentityServerBuilder)

來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs

針對 ASP.NET Core案例,設定 Identity Server 的預設值。

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>)

來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
IdentityServerBuilderConfigurationExtensions.cs
來源:
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

適用於