PolicyBuilderExtensions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extensions for building the RequiredScope policy during application startup.
public static class PolicyBuilderExtensions
type PolicyBuilderExtensions = class
Public Module PolicyBuilderExtensions
- Inheritance
-
PolicyBuilderExtensions
Examples
services.AddAuthorization(o =>
{ o.AddPolicy("Custom",
policyBuilder =>policyBuilder.RequireScope("access_as_user"));
});
Methods
RequireScope(AuthorizationPolicyBuilder, IEnumerable<String>) |
Adds a ScopeAuthorizationRequirement to the current instance which requires that the current user has the specified claim and that the claim value must be one of the allowed values. |
RequireScope(AuthorizationPolicyBuilder, String[]) |
Adds a ScopeAuthorizationRequirement to the current instance which requires that the current user has the specified claim and that the claim value must be one of the allowed values. |
RequireScopeOrAppPermission(AuthorizationPolicyBuilder, IEnumerable<String>, IEnumerable<String>) |
Adds a ScopeOrAppPermissionAuthorizationRequirement to the current instance which requires that the current user has the specified claim and that the claim value must be one of the allowed values. |
Applies to
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示