Session properties
A client session has a number of properties associated with it. Properties are key-value pairs. Both the key and the value are case sensitive.
- Send messages directly to that session or set of sessions.
For more information, see Sending request messages to a session filter.
- Subscribe that session or set of sessions to a topic.
For more information, see Managing subscriptions.
- Unsubscribe that session or set of sessions from a topic.
For more information, see Managing subscriptions.
A client session with the appropriate permissions can also view all of the session properties and modify the user-defined session properties. For more information, see Working with session properties.
Fixed properties
- $SessionId
- The session identifier.
- $Principal
- The security principal the session uses to connect to Diffusion Cloud.
- $Roles
- Authorization roles assigned to the session, represented as quoted strings (for example "client", "topic_control"). For more information, see Role-based authorization.
- $ClientType
- The client type of the session. For more information, see Client types.
- $Transport
- The transport the client session uses to connect to Diffusion Cloud. For more information, see Client types.
- $ServerName
- The name of Diffusion Cloud that the client connects to.
- $Connector
- The name of the connector on which the client connected to Diffusion Cloud.
- $Country
- The two letter country code for the country where the client's internet address is located. The value is uppercase.
- $Language
- The two letter language code for the most common language of the country where the client's internet address is located. The value is lowercase.
- $ClientIP
- The session's IP address represented as a string.
- $Latitude
- The client session's geographic latitude, if this can be ascertained.
- $Longitude
- The client session's geographic longitude, if this can be ascertained.
- $StartTime
- The client session's start time in milliseconds since the epoch.
User-defined properties
An authentication handler that allows the client session to connect can assign additional properties to the session. The keys of these properties are case sensitive, non-empty strings, and cannot contain any of ' ', '\t', '\r', '\n', '"', ''', '(', ')'
Client-proposed properties
A client can propose user-defined session properties when it opens a session. You can configure the system authentication handler to accept client-proposed properties. You can also write an authentication handler with the Authenticator interface to accept client-proposed properties and apply them to the session.
This page last modified: 2020/07/07