Share via


WebPubSubServiceClient.CheckPermissionAsync Method

Definition

Check if a connection has permission to the specified action.

public virtual System.Threading.Tasks.Task<Azure.Response<bool>> CheckPermissionAsync (Azure.Messaging.WebPubSub.WebPubSubPermission permission, string connectionId, string targetName = default, Azure.RequestContext context = default);
abstract member CheckPermissionAsync : Azure.Messaging.WebPubSub.WebPubSubPermission * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response<bool>>
override this.CheckPermissionAsync : Azure.Messaging.WebPubSub.WebPubSubPermission * string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response<bool>>
Public Overridable Function CheckPermissionAsync (permission As WebPubSubPermission, connectionId As String, Optional targetName As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response(Of Boolean))

Parameters

permission
WebPubSubPermission

The permission: current supported actions are joinLeaveGroup and sendToGroup.

connectionId
String

Target connection Id.

targetName
String

Optional. If not set, get the permission for all targets. If set, get the permission for the specific target. The meaning of the target depends on the specific permission.

context
RequestContext

Options specifying the cancellation token, controlling error reporting, etc.

Returns

Applies to