PageModel.Forbid PageModel.Forbid PageModel.Forbid Method

Definition

Overloads

Forbid() Forbid() Forbid()

Creates a ForbidResult (Status403Forbidden by default).

Forbid(AuthenticationProperties) Forbid(AuthenticationProperties) Forbid(AuthenticationProperties)

Creates a ForbidResult (Status403Forbidden by default) with the specified properties.

Forbid(String[]) Forbid(String[]) Forbid(String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes.

Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes and properties.

Forbid() Forbid() Forbid()

Creates a ForbidResult (Status403Forbidden by default).

public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid ();
abstract member Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid () As ForbidResult

Returns

The created ForbidResult for the response.

Remarks

Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.

Forbid(AuthenticationProperties) Forbid(AuthenticationProperties) Forbid(AuthenticationProperties)

Creates a ForbidResult (Status403Forbidden by default) with the specified properties.

public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
abstract member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid (properties As AuthenticationProperties) As ForbidResult

Parameters

Returns

The created ForbidResult for the response.

Remarks

Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.

Forbid(String[]) Forbid(String[]) Forbid(String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes.

public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid (params string[] authenticationSchemes);
abstract member Forbid : string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid (ParamArray authenticationSchemes As String()) As ForbidResult

Parameters

authenticationSchemes
String[]

The authentication schemes to challenge.

Returns

The created ForbidResult for the response.

Remarks

Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.

Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes and properties.

public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes);
abstract member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid (properties As AuthenticationProperties, ParamArray authenticationSchemes As String()) As ForbidResult

Parameters

authenticationSchemes
String[]

The authentication schemes to challenge.

Returns

The created ForbidResult for the response.

Remarks

Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.

Applies to