Results.Forbid(AuthenticationProperties, IList<String>) 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.
Creates a IResult that on execution invokes ForbidAsync(HttpContext, String, AuthenticationProperties).
By default, executing this result returns a Status403Forbidden. Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.
public static Microsoft.AspNetCore.Http.IResult Forbid (Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties = default, System.Collections.Generic.IList<string>? authenticationSchemes = default);
static member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties * System.Collections.Generic.IList<string> -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Forbid (Optional properties As AuthenticationProperties = Nothing, Optional authenticationSchemes As IList(Of String) = Nothing) As IResult
Parameters
- properties
- AuthenticationProperties
AuthenticationProperties used to perform the authentication challenge.
Returns
The created IResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.