DefaultAuthorizationService 构造函数

定义

重载

DefaultAuthorizationService(IAuthorizationPolicyProvider, IEnumerable<IAuthorizationHandler>, ILogger<DefaultAuthorizationService>)

创建 DefaultAuthorizationService 的新实例。

DefaultAuthorizationService(IAuthorizationPolicyProvider, IAuthorizationHandlerProvider, ILogger<DefaultAuthorizationService>, IAuthorizationHandlerContextFactory, IAuthorizationEvaluator, IOptions<AuthorizationOptions>)

创建 DefaultAuthorizationService 的新实例。

DefaultAuthorizationService(IAuthorizationPolicyProvider, IEnumerable<IAuthorizationHandler>, ILogger<DefaultAuthorizationService>, IAuthorizationHandlerContextFactory, IAuthorizationEvaluator, IOptions<AuthorizationOptions>)

创建 DefaultAuthorizationService 的新实例。

DefaultAuthorizationService(IAuthorizationPolicyProvider, IEnumerable<IAuthorizationHandler>, ILogger<DefaultAuthorizationService>)

创建 DefaultAuthorizationService 的新实例。

public:
 DefaultAuthorizationService(Microsoft::AspNetCore::Authorization::IAuthorizationPolicyProvider ^ policyProvider, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationHandler ^> ^ handlers, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Authorization::DefaultAuthorizationService ^> ^ logger);
public DefaultAuthorizationService (Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationHandler> handlers, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> logger);
new Microsoft.AspNetCore.Authorization.DefaultAuthorizationService : Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider * seq<Microsoft.AspNetCore.Authorization.IAuthorizationHandler> * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> -> Microsoft.AspNetCore.Authorization.DefaultAuthorizationService
Public Sub New (policyProvider As IAuthorizationPolicyProvider, handlers As IEnumerable(Of IAuthorizationHandler), logger As ILogger(Of DefaultAuthorizationService))

参数

policyProvider
IAuthorizationPolicyProvider

IAuthorizationPolicyProvider用于提供策略的 。

handlers
IEnumerable<IAuthorizationHandler>

用于实现 IAuthorizationRequirement的处理程序。

logger
ILogger<DefaultAuthorizationService>

用于记录消息、警告和错误的记录器。

适用于

DefaultAuthorizationService(IAuthorizationPolicyProvider, IAuthorizationHandlerProvider, ILogger<DefaultAuthorizationService>, IAuthorizationHandlerContextFactory, IAuthorizationEvaluator, IOptions<AuthorizationOptions>)

Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs

创建 DefaultAuthorizationService 的新实例。

public:
 DefaultAuthorizationService(Microsoft::AspNetCore::Authorization::IAuthorizationPolicyProvider ^ policyProvider, Microsoft::AspNetCore::Authorization::IAuthorizationHandlerProvider ^ handlers, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Authorization::DefaultAuthorizationService ^> ^ logger, Microsoft::AspNetCore::Authorization::IAuthorizationHandlerContextFactory ^ contextFactory, Microsoft::AspNetCore::Authorization::IAuthorizationEvaluator ^ evaluator, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Authorization::AuthorizationOptions ^> ^ options);
public DefaultAuthorizationService (Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider handlers, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> logger, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory contextFactory, Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator evaluator, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Authorization.AuthorizationOptions> options);
new Microsoft.AspNetCore.Authorization.DefaultAuthorizationService : Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider * Microsoft.AspNetCore.Authorization.IAuthorizationHandlerProvider * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> * Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory * Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Authorization.AuthorizationOptions> -> Microsoft.AspNetCore.Authorization.DefaultAuthorizationService
Public Sub New (policyProvider As IAuthorizationPolicyProvider, handlers As IAuthorizationHandlerProvider, logger As ILogger(Of DefaultAuthorizationService), contextFactory As IAuthorizationHandlerContextFactory, evaluator As IAuthorizationEvaluator, options As IOptions(Of AuthorizationOptions))

参数

policyProvider
IAuthorizationPolicyProvider

IAuthorizationPolicyProvider用于提供策略的 。

handlers
IAuthorizationHandlerProvider

用于实现 IAuthorizationRequirement的处理程序。

logger
ILogger<DefaultAuthorizationService>

用于记录消息、警告和错误的记录器。

contextFactory
IAuthorizationHandlerContextFactory

IAuthorizationHandlerContextFactory用于创建上下文以处理授权的 。

evaluator
IAuthorizationEvaluator

IAuthorizationEvaluator用于确定授权是否成功的 。

适用于

DefaultAuthorizationService(IAuthorizationPolicyProvider, IEnumerable<IAuthorizationHandler>, ILogger<DefaultAuthorizationService>, IAuthorizationHandlerContextFactory, IAuthorizationEvaluator, IOptions<AuthorizationOptions>)

创建 DefaultAuthorizationService 的新实例。

public:
 DefaultAuthorizationService(Microsoft::AspNetCore::Authorization::IAuthorizationPolicyProvider ^ policyProvider, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationHandler ^> ^ handlers, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Authorization::DefaultAuthorizationService ^> ^ logger, Microsoft::AspNetCore::Authorization::IAuthorizationHandlerContextFactory ^ contextFactory, Microsoft::AspNetCore::Authorization::IAuthorizationEvaluator ^ evaluator, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Authorization::AuthorizationOptions ^> ^ options);
public DefaultAuthorizationService (Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider policyProvider, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationHandler> handlers, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> logger, Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory contextFactory, Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator evaluator, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Authorization.AuthorizationOptions> options);
new Microsoft.AspNetCore.Authorization.DefaultAuthorizationService : Microsoft.AspNetCore.Authorization.IAuthorizationPolicyProvider * seq<Microsoft.AspNetCore.Authorization.IAuthorizationHandler> * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Authorization.DefaultAuthorizationService> * Microsoft.AspNetCore.Authorization.IAuthorizationHandlerContextFactory * Microsoft.AspNetCore.Authorization.IAuthorizationEvaluator * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Authorization.AuthorizationOptions> -> Microsoft.AspNetCore.Authorization.DefaultAuthorizationService
Public Sub New (policyProvider As IAuthorizationPolicyProvider, handlers As IEnumerable(Of IAuthorizationHandler), logger As ILogger(Of DefaultAuthorizationService), contextFactory As IAuthorizationHandlerContextFactory, evaluator As IAuthorizationEvaluator, options As IOptions(Of AuthorizationOptions))

参数

policyProvider
IAuthorizationPolicyProvider

IAuthorizationPolicyProvider用于提供策略的 。

handlers
IEnumerable<IAuthorizationHandler>

用于实现 IAuthorizationRequirement的处理程序。

logger
ILogger<DefaultAuthorizationService>

用于记录消息、警告和错误的记录器。

contextFactory
IAuthorizationHandlerContextFactory

IAuthorizationHandlerContextFactory用于创建上下文以处理授权的 。

evaluator
IAuthorizationEvaluator

IAuthorizationEvaluator用于确定创作是否成功的 。

适用于