AuthorizationServiceExtensions.AuthorizeAsync Methode

Definition

Überlädt

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Überprüft, ob ein Benutzer eine bestimmte Anforderung für die angegebene Ressource erfüllt.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy);
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy);
public static System.Threading.Tasks.Task<bool> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> System.Threading.Tasks.Task<bool>
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, policy As AuthorizationPolicy) As Task(Of Boolean)
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, policy As AuthorizationPolicy) As Task(Of AuthorizationResult)

Parameter

service
IAuthorizationService

Die IAuthorizationService die Autorisierung bereitstellen.

user
ClaimsPrincipal

Der Benutzer, für den die Richtlinie ausgewertet werden soll.

policy
AuthorizationPolicy

Die zu bewertende Richtlinie.

Gibt zurück

Ein Kennzeichen, das angibt, ob die Richtlinienauswertung erfolgreich war oder fehlgeschlagen ist. Dieser Wert wird true, wenn der Benutzer die Richtlinie erfüllt, andernfalls false.

Gilt für:

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::String ^ policyName);
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::String ^ policyName);
public static System.Threading.Tasks.Task<bool> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, string policyName);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, string policyName);
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * string -> System.Threading.Tasks.Task<bool>
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, policyName As String) As Task(Of Boolean)
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, policyName As String) As Task(Of AuthorizationResult)

Parameter

service
IAuthorizationService

Die IAuthorizationService die Autorisierung bereitstellen.

user
ClaimsPrincipal

Der Benutzer, für den die Richtlinie ausgewertet werden soll.

policyName
String

Der Name der zu bewertenden Richtlinie.

Gibt zurück

Ein Kennzeichen, das angibt, ob die Richtlinienauswertung erfolgreich war oder fehlgeschlagen ist. Dieser Wert wird true, wenn der Benutzer die Richtlinie erfüllt, andernfalls false.

Gilt für:

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie für die angegebene Ressource erfüllt.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy);
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy);
public static System.Threading.Tasks.Task<bool> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object? resource, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy);
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * obj * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> System.Threading.Tasks.Task<bool>
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * obj * Microsoft.AspNetCore.Authorization.AuthorizationPolicy -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, resource As Object, policy As AuthorizationPolicy) As Task(Of Boolean)
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, resource As Object, policy As AuthorizationPolicy) As Task(Of AuthorizationResult)

Parameter

service
IAuthorizationService

Die IAuthorizationService die Autorisierung bereitstellen.

user
ClaimsPrincipal

Der Benutzer, für den die Richtlinie ausgewertet werden soll.

resource
Object

Die Ressource, für die die Richtlinie ausgewertet werden soll.

policy
AuthorizationPolicy

Die zu bewertende Richtlinie.

Gibt zurück

Ein Kennzeichen, das angibt, ob die Richtlinienauswertung erfolgreich war oder fehlgeschlagen ist. Dieser Wert wird true, wenn der Benutzer die Richtlinie erfüllt, andernfalls false.

Gilt für:

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs
Quelle:
AuthorizationServiceExtensions.cs

Überprüft, ob ein Benutzer eine bestimmte Anforderung für die angegebene Ressource erfüllt.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^ requirement);
public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(Microsoft::AspNetCore::Authorization::IAuthorizationService ^ service, System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^ requirement);
public static System.Threading.Tasks.Task<bool> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object resource, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (this Microsoft.AspNetCore.Authorization.IAuthorizationService service, System.Security.Claims.ClaimsPrincipal user, object? resource, Microsoft.AspNetCore.Authorization.IAuthorizationRequirement requirement);
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * obj * Microsoft.AspNetCore.Authorization.IAuthorizationRequirement -> System.Threading.Tasks.Task<bool>
static member AuthorizeAsync : Microsoft.AspNetCore.Authorization.IAuthorizationService * System.Security.Claims.ClaimsPrincipal * obj * Microsoft.AspNetCore.Authorization.IAuthorizationRequirement -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, resource As Object, requirement As IAuthorizationRequirement) As Task(Of Boolean)
<Extension()>
Public Function AuthorizeAsync (service As IAuthorizationService, user As ClaimsPrincipal, resource As Object, requirement As IAuthorizationRequirement) As Task(Of AuthorizationResult)

Parameter

service
IAuthorizationService

Die IAuthorizationService die Autorisierung bereitstellen.

user
ClaimsPrincipal

Der Benutzer, für den die Richtlinie ausgewertet werden soll.

resource
Object

Die Ressource, für die die Richtlinie ausgewertet werden soll.

requirement
IAuthorizationRequirement

Die Anforderung, die Richtlinie auszuwerten.

Gibt zurück

Ein Flag, das angibt, ob die Anforderungsauswertung erfolgreich war oder fehlgeschlagen ist. Dieser Wert wird true, wenn der Benutzer die Richtlinie erfüllt, andernfalls false.

Gilt für: