Share via


IAuthorizationService.CheckAuthorizationAsync Method

Definition

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

public System.Threading.Tasks.ValueTask<bool> CheckAuthorizationAsync (Microsoft.ServiceHub.Framework.Services.ProtectedOperation operation, System.Threading.CancellationToken cancellationToken = default);
abstract member CheckAuthorizationAsync : Microsoft.ServiceHub.Framework.Services.ProtectedOperation * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
Public Function CheckAuthorizationAsync (operation As ProtectedOperation, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(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