AuthenticationHttpContextExtensions.ForbidAsync Método

Definición

Sobrecargas

ForbidAsync(HttpContext, String)

Prohíba la solicitud actual mediante el esquema especificado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder.

ForbidAsync(HttpContext, String, AuthenticationProperties)

Prohíba la solicitud actual mediante el esquema especificado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder.

ForbidAsync(HttpContext)

Prohíba la solicitud actual mediante el esquema de prohibición predeterminado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder. El esquema de prohibición predeterminado se puede configurar mediante DefaultForbidScheme .

ForbidAsync(HttpContext, AuthenticationProperties)

Prohíba la solicitud actual mediante el esquema de prohibición predeterminado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder. El esquema de prohibición predeterminado se puede configurar mediante DefaultForbidScheme .

ForbidAsync(HttpContext, String)

Prohíba la solicitud actual mediante el esquema especificado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ ForbidAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, string? scheme);
static member ForbidAsync : Microsoft.AspNetCore.Http.HttpContext * string -> System.Threading.Tasks.Task
<Extension()>
Public Function ForbidAsync (context As HttpContext, scheme As String) As Task

Parámetros

context
HttpContext

HttpContextContexto.

scheme
String

Nombre del esquema de autenticación.

Devoluciones

Task

Tarea.

Se aplica a

ForbidAsync(HttpContext, String, AuthenticationProperties)

Prohíba la solicitud actual mediante el esquema especificado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ ForbidAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme, Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, string? scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties);
static member ForbidAsync : Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Authentication.AuthenticationProperties -> System.Threading.Tasks.Task
<Extension()>
Public Function ForbidAsync (context As HttpContext, scheme As String, properties As AuthenticationProperties) As Task

Parámetros

context
HttpContext

HttpContextContexto.

scheme
String

Nombre del esquema de autenticación.

Devoluciones

Task

Tarea.

Se aplica a

ForbidAsync(HttpContext)

Prohíba la solicitud actual mediante el esquema de prohibición predeterminado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder. El esquema de prohibición predeterminado se puede configurar mediante DefaultForbidScheme .

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ ForbidAsync(Microsoft::AspNetCore::Http::HttpContext ^ context);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context);
static member ForbidAsync : Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task
<Extension()>
Public Function ForbidAsync (context As HttpContext) As Task

Parámetros

context
HttpContext

HttpContextContexto.

Devoluciones

Task

Tarea.

Se aplica a

ForbidAsync(HttpContext, AuthenticationProperties)

Prohíba la solicitud actual mediante el esquema de prohibición predeterminado. Prohibido se usa cuando un usuario autenticado intenta acceder a un recurso al que no se le permite acceder. El esquema de prohibición predeterminado se puede configurar mediante DefaultForbidScheme .

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ ForbidAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
public static System.Threading.Tasks.Task ForbidAsync (this Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties);
static member ForbidAsync : Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Authentication.AuthenticationProperties -> System.Threading.Tasks.Task
<Extension()>
Public Function ForbidAsync (context As HttpContext, properties As AuthenticationProperties) As Task

Parámetros

context
HttpContext

HttpContextContexto.

Devoluciones

Task

Tarea.

Se aplica a