ForbidResult Class

An Microsoft.AspNetCore.Mvc.ActionResult that on execution invokes AuthenticationManager.ForbidAsync.

Namespace
Microsoft.AspNetCore.Mvc
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class ForbidResult : ActionResult, IActionResult
class Microsoft.AspNetCore.Mvc.ForbidResult

Constructors

ForbidResult()

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult.

public ForbidResult()
ForbidResult(Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult with the specified <em>properties</em>.

Arguments:properties (Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties) – Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties used to perform the authentication challenge.
public ForbidResult(AuthenticationProperties properties)
ForbidResult(System.Collections.Generic.IList<System.String>)

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult with the specified authentication schemes.

Arguments:authenticationSchemes (System.Collections.Generic.IList<System.String>) – The authentication schemes to challenge.
public ForbidResult(IList<string> authenticationSchemes)
ForbidResult(System.Collections.Generic.IList<System.String>, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult with the specified authentication schemes and <em>properties</em>.

Arguments:
public ForbidResult(IList<string> authenticationSchemes, AuthenticationProperties properties)
ForbidResult(System.String)

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult with the specified authentication scheme.

Arguments:authenticationScheme (System.String) – The authentication scheme to challenge.
public ForbidResult(string authenticationScheme)
ForbidResult(System.String, Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties)

Initializes a new instance of Microsoft.AspNetCore.Mvc.ForbidResult with the specified authentication scheme and <em>properties</em>.

Arguments:
public ForbidResult(string authenticationScheme, AuthenticationProperties properties)

Properties

Microsoft.AspNetCore.Mvc.ForbidResult.AuthenticationSchemes

Gets or sets the authentication schemes that are challenged.

Return type:System.Collections.Generic.IList<System.String>
public IList<string> AuthenticationSchemes { get; set; }
Microsoft.AspNetCore.Mvc.ForbidResult.Properties

Gets or sets the Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties used to perform the authentication challenge.

Return type:Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties
public AuthenticationProperties Properties { get; set; }

Methods

ExecuteResultAsync(Microsoft.AspNetCore.Mvc.ActionContext)
Return type:System.Threading.Tasks.Task
public override Task ExecuteResultAsync(ActionContext context)