Bagikan melalui


DefaultAuthorizationService.AuthorizeAsync Metode

Definisi

Overload

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Memeriksa apakah pengguna memenuhi serangkaian persyaratan tertentu untuk sumber daya yang ditentukan.

AuthorizeAsync(ClaimsPrincipal, Object, String)

Memeriksa apakah pengguna memenuhi kebijakan otorisasi tertentu.

AuthorizeAsync(ClaimsPrincipal, Object, IEnumerable<IAuthorizationRequirement>)

Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs

Memeriksa apakah pengguna memenuhi serangkaian persyaratan tertentu untuk sumber daya yang ditentukan.

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

Pengguna untuk mengevaluasi persyaratan terhadap.

resource
Object

Sumber daya untuk mengevaluasi persyaratan terhadap.

requirements
IEnumerable<IAuthorizationRequirement>

Persyaratan untuk dievaluasi.

Mengembalikan

Bendera yang menunjukkan apakah otorisasi telah berhasil. Nilai ini true ketika pengguna memenuhi kebijakan, jika tidak, false.

Penerapan

Berlaku untuk

AuthorizeAsync(ClaimsPrincipal, Object, String)

Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs
Sumber:
DefaultAuthorizationService.cs

Memeriksa apakah pengguna memenuhi kebijakan otorisasi tertentu.

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

Pengguna untuk memeriksa kebijakan.

resource
Object

Sumber daya yang harus diperiksa kebijakannya.

policyName
String

Nama kebijakan yang akan diperiksa terhadap konteks tertentu.

Mengembalikan

Bendera yang menunjukkan apakah otorisasi telah berhasil. Nilai ini true ketika pengguna memenuhi kebijakan jika tidak false.

Penerapan

Berlaku untuk