Udostępnij za pośrednictwem


IAuthenticationService.ForbidAsync Metoda

Definicja

Zabrania określonego schematu uwierzytelniania. Ustawienie Zabronione jest używane, gdy uwierzytelniony użytkownik próbuje uzyskać dostęp do zasobu, do którego nie ma zezwolenia.

public:
 System::Threading::Tasks::Task ^ ForbidAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme, Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public System.Threading.Tasks.Task ForbidAsync (Microsoft.AspNetCore.Http.HttpContext context, string scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
public System.Threading.Tasks.Task ForbidAsync (Microsoft.AspNetCore.Http.HttpContext context, string? scheme, Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties);
abstract member ForbidAsync : Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Authentication.AuthenticationProperties -> System.Threading.Tasks.Task
Public Function ForbidAsync (context As HttpContext, scheme As String, properties As AuthenticationProperties) As Task

Parametry

context
HttpContext

Element HttpContext.

scheme
String

Nazwa schematu uwierzytelniania.

Zwraca

Zadanie.

Dotyczy