Partager via


AuthorizationServiceExtensions.AuthorizeAsync Méthode

Définition

Surcharges

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Vérifie si un utilisateur répond à une exigence spécifique pour la ressource spécifiée

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

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)

Paramètres

service
IAuthorizationService

La IAuthorizationService fournissant l’autorisation.

user
ClaimsPrincipal

Utilisateur sur qui évaluer la stratégie.

policy
AuthorizationPolicy

Stratégie à évaluer.

Retours

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

S’applique à

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

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)

Paramètres

service
IAuthorizationService

La IAuthorizationService fournissant l’autorisation.

user
ClaimsPrincipal

Utilisateur sur qui évaluer la stratégie.

policyName
String

Nom de la stratégie à évaluer.

Retours

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

S’applique à

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs

Vérifie si un utilisateur répond à une stratégie d’autorisation spécifique par rapport à la ressource spécifiée.

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)

Paramètres

service
IAuthorizationService

La IAuthorizationService fournissant l’autorisation.

user
ClaimsPrincipal

Utilisateur sur qui évaluer la stratégie.

resource
Object

Ressource à évaluer par rapport à la stratégie.

policy
AuthorizationPolicy

Stratégie à évaluer.

Retours

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

S’applique à

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs
Source:
AuthorizationServiceExtensions.cs

Vérifie si un utilisateur répond à une exigence spécifique pour la ressource spécifiée

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)

Paramètres

service
IAuthorizationService

La IAuthorizationService fournissant l’autorisation.

user
ClaimsPrincipal

Utilisateur sur qui évaluer la stratégie.

resource
Object

Ressource à évaluer par rapport à la stratégie.

requirement
IAuthorizationRequirement

Exigence d’évaluation de la stratégie.

Retours

Indicateur indiquant si l’évaluation des exigences a réussi ou échoué. Cette valeur est true lorsque l’utilisateur remplit la stratégie, sinon false.

S’applique à