IAuthorizationService.CheckAuthorizationAsync 方法

定义

检查以前经过身份验证的用户是否有权执行某些操作。

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)

参数

operation
ProtectedOperation

要执行的操作。

cancellationToken
CancellationToken

取消标记。

返回

true 如果客户端有权执行 ,则 operation为 ; false 否则为 。

适用于