GenerateClientTokenOptions interface

Options for generating a token to connect a client to the Azure Web Pubsub service.

Extends

Properties

expirationTimeInMinutes

Minutes until the token expires.

groups

The groups to join when the client connects

roles

The roles that the connection with the generated token will have. Roles give the client initial permissions to leave, join, or publish to groups when using PubSub subprotocol

  • webpubsub.joinLeaveGroup: the client can join or leave any group
  • webpubsub.sendToGroup: the client can send messages to any group
  • webpubsub.joinLeaveGroup.<group>: the client can join or leave group <group>
  • webpubsub.sendToGroup.<group>: the client can send messages to group <group>

https://azure.github.io/azure-webpubsub/references/pubsub-websocket-subprotocol#permissions

userId

The userId for the client.

Inherited Properties

abortSignal

The signal which can be used to abort requests.

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

requestOptions

Options used when creating and sending HTTP requests for this operation.

serializerOptions

Options to override serialization/de-serialization behavior.

tracingOptions

Options used when tracing is enabled.

Property Details

expirationTimeInMinutes

Minutes until the token expires.

expirationTimeInMinutes?: number

Property Value

number

groups

The groups to join when the client connects

groups?: string[]

Property Value

string[]

roles

The roles that the connection with the generated token will have. Roles give the client initial permissions to leave, join, or publish to groups when using PubSub subprotocol

  • webpubsub.joinLeaveGroup: the client can join or leave any group
  • webpubsub.sendToGroup: the client can send messages to any group
  • webpubsub.joinLeaveGroup.<group>: the client can join or leave group <group>
  • webpubsub.sendToGroup.<group>: the client can send messages to group <group>

https://azure.github.io/azure-webpubsub/references/pubsub-websocket-subprotocol#permissions

roles?: string[]

Property Value

string[]

userId

The userId for the client.

userId?: string

Property Value

string

Inherited Property Details

abortSignal

The signal which can be used to abort requests.

abortSignal?: AbortSignalLike

Property Value

Inherited From OperationOptions.abortSignal

onResponse

A function to be called each time a response is received from the server while performing the requested operation. May be called multiple times.

onResponse?: RawResponseCallback

Property Value

Inherited From OperationOptions.onResponse

requestOptions

Options used when creating and sending HTTP requests for this operation.

requestOptions?: OperationRequestOptions

Property Value

Inherited From OperationOptions.requestOptions

serializerOptions

Options to override serialization/de-serialization behavior.

serializerOptions?: SerializerOptions

Property Value

Inherited From OperationOptions.serializerOptions

tracingOptions

Options used when tracing is enabled.

tracingOptions?: OperationTracingOptions

Property Value

Inherited From OperationOptions.tracingOptions