Delen via


AuthorizationServiceClient.CheckAuthorizationAsync Method

Definition

Checks whether a previously authenticated user is authorized to perform some operation.

public System.Threading.Tasks.Task<bool> CheckAuthorizationAsync (Microsoft.ServiceHub.Framework.Services.ProtectedOperation operation, System.Threading.CancellationToken cancellationToken = default);
member this.CheckAuthorizationAsync : Microsoft.ServiceHub.Framework.Services.ProtectedOperation * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function CheckAuthorizationAsync (operation As ProtectedOperation, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

operation
ProtectedOperation

The operation to be performed.

cancellationToken
CancellationToken

A cancellation token.

Returns

true if the client is authorized to perform the operation; false otherwise.

Applies to