AuthorizationPolicyBuilder.RequireAssertion Method
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.
Overloads
RequireAssertion(Func<AuthorizationHandlerContext,Task<Boolean>>) |
Adds an AssertionRequirement to the current instance. |
RequireAssertion(Func<AuthorizationHandlerContext,Boolean>) |
Adds an AssertionRequirement to the current instance. |
RequireAssertion(Func<AuthorizationHandlerContext,Task<Boolean>>)
Adds an AssertionRequirement to the current instance.
public:
Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ RequireAssertion(Func<Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^, System::Threading::Tasks::Task<bool> ^> ^ handler);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion (Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext,System.Threading.Tasks.Task<bool>> handler);
member this.RequireAssertion : Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext, System.Threading.Tasks.Task<bool>> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireAssertion (handler As Func(Of AuthorizationHandlerContext, Task(Of Boolean))) As AuthorizationPolicyBuilder
Parameters
- handler
- Func<AuthorizationHandlerContext,Task<Boolean>>
The handler to evaluate during authorization.
Returns
A reference to this instance after the operation has completed.
Applies to
RequireAssertion(Func<AuthorizationHandlerContext,Boolean>)
Adds an AssertionRequirement to the current instance.
public:
Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ RequireAssertion(Func<Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^, bool> ^ handler);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion (Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext,bool> handler);
member this.RequireAssertion : Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext, bool> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireAssertion (handler As Func(Of AuthorizationHandlerContext, Boolean)) As AuthorizationPolicyBuilder
Parameters
- handler
- Func<AuthorizationHandlerContext,Boolean>
The handler to evaluate during authorization.
Returns
A reference to this instance after the operation has completed.