IAuthorizationService.CheckAuthorizationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.