Udostępnij za pośrednictwem


AuthorizationServiceExtensions.AuthorizeAsync Metoda

Definicja

Przeciążenia

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Sprawdza, czy użytkownik spełnia określone wymaganie dla określonego zasobu

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, AuthorizationPolicy)

Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

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)

Parametry

service
IAuthorizationService

IAuthorizationService zapewniając autoryzację.

user
ClaimsPrincipal

Użytkownik do oceny zasad.

policy
AuthorizationPolicy

Zasady do oceny.

Zwraca

Flaga wskazująca, czy ocena zasad zakończyła się powodzeniem, czy niepowodzeniem. Ta wartość jest true, gdy użytkownik spełnia zasady, w przeciwnym razie false.

Dotyczy

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, String)

Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

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)

Parametry

service
IAuthorizationService

IAuthorizationService zapewniając autoryzację.

user
ClaimsPrincipal

Użytkownik do oceny zasad.

policyName
String

Nazwa zasad do oceny.

Zwraca

Flaga wskazująca, czy ocena zasad zakończyła się powodzeniem, czy niepowodzeniem. Ta wartość jest true, gdy użytkownik spełnia zasady, w przeciwnym razie false.

Dotyczy

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, AuthorizationPolicy)

Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs

Sprawdza, czy użytkownik spełnia określone zasady autoryzacji względem określonego zasobu.

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)

Parametry

service
IAuthorizationService

IAuthorizationService zapewniając autoryzację.

user
ClaimsPrincipal

Użytkownik do oceny zasad.

resource
Object

Zasób do oceny zasad.

policy
AuthorizationPolicy

Zasady do oceny.

Zwraca

Flaga wskazująca, czy ocena zasad zakończyła się powodzeniem, czy niepowodzeniem. Ta wartość jest true, gdy użytkownik spełnia zasady, w przeciwnym razie false.

Dotyczy

AuthorizeAsync(IAuthorizationService, ClaimsPrincipal, Object, IAuthorizationRequirement)

Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs
Źródło:
AuthorizationServiceExtensions.cs

Sprawdza, czy użytkownik spełnia określone wymaganie dla określonego zasobu

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)

Parametry

service
IAuthorizationService

IAuthorizationService zapewniając autoryzację.

user
ClaimsPrincipal

Użytkownik do oceny zasad.

resource
Object

Zasób do oceny zasad.

requirement
IAuthorizationRequirement

Wymaganie oceny zasad względem.

Zwraca

Flaga wskazująca, czy ocena wymagań zakończyła się powodzeniem, czy niepowodzeniem. Ta wartość jest true, gdy użytkownik spełnia zasady, w przeciwnym razie false.

Dotyczy