Freigeben über


DefaultAuthorizationService.AuthorizeAsync Methode

Definition

Überlädt

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Überprüft, ob ein Benutzer einen bestimmten Satz von Anforderungen für die angegebene Ressource erfüllt.

AuthorizeAsync(ClaimsPrincipal, Object, String)

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie erfüllt.

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs

Überprüft, ob ein Benutzer einen bestimmten Satz von Anforderungen für die angegebene Ressource erfüllt.

public:
 virtual System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^> ^ requirements);
public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^> ^ requirements);
public System.Threading.Tasks.Task<bool> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object resource, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object? resource, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements);
abstract member AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> -> System.Threading.Tasks.Task<bool>
override this.AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> -> System.Threading.Tasks.Task<bool>
abstract member AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
override this.AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
Public Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, requirements As IEnumerable(Of IAuthorizationRequirement)) As Task(Of Boolean)
Public Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, requirements As IEnumerable(Of IAuthorizationRequirement)) As Task(Of AuthorizationResult)
Public Overridable Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, requirements As IEnumerable(Of IAuthorizationRequirement)) As Task(Of AuthorizationResult)

Parameter

user
ClaimsPrincipal

Der Benutzer, mit dem die Anforderungen ausgewertet werden sollen.

resource
Object

Die Ressource, mit der die Anforderungen ausgewertet werden sollen.

requirements
IEnumerable<IAuthorizationRequirement>

Die zu bewertenden Anforderungen.

Gibt zurück

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

Implementiert

Gilt für:

AuthorizeAsync(ClaimsPrincipal, Object, String)

Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs
Quelle:
DefaultAuthorizationService.cs

Überprüft, ob ein Benutzer eine bestimmte Autorisierungsrichtlinie erfüllt.

public:
 virtual System::Threading::Tasks::Task<bool> ^ AuthorizeAsync(System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, System::String ^ policyName);
public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationResult ^> ^ AuthorizeAsync(System::Security::Claims::ClaimsPrincipal ^ user, System::Object ^ resource, System::String ^ policyName);
public System.Threading.Tasks.Task<bool> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object resource, string policyName);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object resource, string policyName);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult> AuthorizeAsync (System.Security.Claims.ClaimsPrincipal user, object? resource, string policyName);
abstract member AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * string -> System.Threading.Tasks.Task<bool>
override this.AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * string -> System.Threading.Tasks.Task<bool>
abstract member AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
override this.AuthorizeAsync : System.Security.Claims.ClaimsPrincipal * obj * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationResult>
Public Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, policyName As String) As Task(Of Boolean)
Public Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, policyName As String) As Task(Of AuthorizationResult)
Public Overridable Function AuthorizeAsync (user As ClaimsPrincipal, resource As Object, policyName As String) As Task(Of AuthorizationResult)

Parameter

user
ClaimsPrincipal

Der Benutzer, mit dem die Richtlinie überprüft werden soll.

resource
Object

Die Ressource, mit der die Richtlinie überprüft werden soll.

policyName
String

Der Name der Richtlinie, die anhand eines bestimmten Kontexts überprüft werden soll.

Gibt zurück

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

Implementiert

Gilt für: