Microsoft.AspNetCore.Authorization.Policy Helper code used when implementing authentication middleware Add all ClaimsIdentities from an additional ClaimPrincipal to the ClaimsPrincipal Merges a new claims principal, placing all new identities first, and eliminating any empty unauthenticated identities from context.User The containing existing . The containing to be added. Extension methods for setting up authorization services in an . Adds authorization policy services to the specified . The to add services to. The so that additional calls can be chained. Base class for authorization handlers that need to be called for a specific requirement type. Does authentication for and sets the resulting to . If no schemes are set, this is a no-op. The . The . unless all schemes specified by fail to authenticate. Attempts authorization for a policy using . The . The result of a call to . The . An optional resource the policy should be checked with. If a resource is not required for policy evaluation you may pass null as the value. Returns if authorization succeeds. Otherwise returns if , otherwise returns If true, means the callee should challenge and try again. Authorization was forbidden. Authorization was successful. Constructor The authorization service. Does authentication for and sets the resulting to . If no schemes are set, this is a no-op. The . The . unless all schemes specified by failed to authenticate. Attempts authorization for a policy using . The . The result of a call to . The . An optional resource the policy should be checked with. If a resource is not required for policy evaluation you may pass null as the value. Returns if authorization succeeds. Otherwise returns if , otherwise returns