Partager via


DefaultAuthorizationService.AuthorizeAsync Méthode

Définition

Surcharges

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Vérifie si un utilisateur répond à un ensemble spécifique de conditions requises pour la ressource spécifiée.

AuthorizeAsync(ClaimsPrincipal, Object, String)

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique.

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs

Vérifie si un utilisateur répond à un ensemble spécifique de conditions requises pour la ressource spécifiée.

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)

Paramètres

user
ClaimsPrincipal

L’utilisateur pour évaluer les exigences par rapport à.

resource
Object

Ressource pour évaluer les exigences par rapport à.

requirements
IEnumerable<IAuthorizationRequirement>

Exigences à évaluer.

Retours

Indicateur indiquant si l’autorisation a réussi. Cette valeur est true lorsque l’utilisateur remplit la stratégie, sinon false.

Implémente

S’applique à

AuthorizeAsync(ClaimsPrincipal, Object, String)

Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs
Source:
DefaultAuthorizationService.cs

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique.

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)

Paramètres

user
ClaimsPrincipal

Utilisateur pour vérifier la stratégie par rapport à.

resource
Object

Ressource avec qui la stratégie doit être vérifiée.

policyName
String

Nom de la stratégie à vérifier par rapport à un contexte spécifique.

Retours

Indicateur indiquant si l’autorisation a réussi. Cette valeur est true lorsque l’utilisateur remplit la stratégie sinon false.

Implémente

S’applique à