TypedResults.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 ForbidHttpResult 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.HttpResults.ForbidHttpResult 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.HttpResults.ForbidHttpResult
Public Shared Function Forbid (Optional properties As AuthenticationProperties = Nothing, Optional authenticationSchemes As IList(Of String) = Nothing) As ForbidHttpResult
Parameters
- properties
- AuthenticationProperties
AuthenticationProperties used to perform the authentication challenge.
Returns
The created ForbidHttpResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor