GetAuthenticationTokenOptions interface

Options for auth a client

Properties

roles

The roles the client 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> <xref:https%3A%2F%2Fazure.github.io%2Fazure-webpubsub%2Freferences%2Fpubsub-websocket-subprotocol%23permissions>
ttl

The time-to-live minutes for the access token. If not set, the default value is 60 minutes.

userId

The userId for the client

Property Details

roles

The roles the client 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> <xref:https%3A%2F%2Fazure.github.io%2Fazure-webpubsub%2Freferences%2Fpubsub-websocket-subprotocol%23permissions>
roles?: string[]

Property Value

string[]

ttl

The time-to-live minutes for the access token. If not set, the default value is 60 minutes.

ttl?: number

Property Value

number

userId

The userId for the client

userId?: string

Property Value

string