AuthenticationHttpContextExtensions.ForbidAsync Methode

Definition

Überlädt

ForbidAsync(HttpContext, String)

Verbieten Sie die aktuelle Anforderung mit dem angegebenen Schema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf.

ForbidAsync(HttpContext, String, AuthenticationProperties)

Verbieten Sie die aktuelle Anforderung mit dem angegebenen Schema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf.

ForbidAsync(HttpContext)

Verbieten Sie die aktuelle Anforderung mit dem standardmäßigen Verbotsschema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf. Das standardmäßige Verbotsschema kann mit DefaultForbidSchemekonfiguriert werden.

ForbidAsync(HttpContext, AuthenticationProperties)

Verbieten Sie die aktuelle Anforderung mit dem standardmäßigen Verbotsschema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf. Das standardmäßige Verbotsschema kann mit DefaultForbidSchemekonfiguriert werden.

ForbidAsync(HttpContext, String)

Verbieten Sie die aktuelle Anforderung mit dem angegebenen Schema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf.

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

Parameter

context
HttpContext

Der HttpContext Kontext.

scheme
String

Der Name des Authentifizierungsschemas.

Gibt zurück

Die Aufgabe.

Gilt für:

ForbidAsync(HttpContext, String, AuthenticationProperties)

Verbieten Sie die aktuelle Anforderung mit dem angegebenen Schema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf.

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

Parameter

context
HttpContext

Der HttpContext Kontext.

scheme
String

Der Name des Authentifizierungsschemas.

properties
AuthenticationProperties

Die AuthenticationProperties Eigenschaften.

Gibt zurück

Die Aufgabe.

Gilt für:

ForbidAsync(HttpContext)

Verbieten Sie die aktuelle Anforderung mit dem standardmäßigen Verbotsschema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf. Das standardmäßige Verbotsschema kann mit DefaultForbidSchemekonfiguriert werden.

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

Parameter

context
HttpContext

Der HttpContext Kontext.

Gibt zurück

Die Aufgabe.

Gilt für:

ForbidAsync(HttpContext, AuthenticationProperties)

Verbieten Sie die aktuelle Anforderung mit dem standardmäßigen Verbotsschema. Forbid wird verwendet, wenn ein authentifizierter Benutzer versucht, auf eine Ressource zuzugreifen, auf die er nicht zugreifen darf. Das standardmäßige Verbotsschema kann mit DefaultForbidSchemekonfiguriert werden.

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

Parameter

context
HttpContext

Der HttpContext Kontext.

properties
AuthenticationProperties

Die AuthenticationProperties Eigenschaften.

Gibt zurück

Die Aufgabe.

Gilt für: