CppWAMP
C++11 client library for the WAMP protocol
|
Session information contained within WAMP WELCOME
messages.
More...
#include <cppwamp/peerdata.hpp>
Public Types | |
using | RoleSet = std::set< String > |
A set of role strings. | |
using | FeatureSet = std::set< String > |
A set of feature strings. | |
using | FeatureMap = std::map< String, FeatureSet > |
A dictionary of feature sets to be supported by each role. | |
Public Member Functions | |
SessionInfo () | |
Default constructor. | |
SessionId | id () const |
Obtains the WAMP session ID. | |
const String & | realm () const |
Obtains realm URI. | |
Agent Identification | |
String | agentString () const |
Obtains the agent string of the WAMP router, if available. More... | |
Role and Feature Announcement | |
Object | roles () const |
Obtains the WELCOME.Details.roles dictionary for the router. More... | |
bool | supportsRoles (const RoleSet &roles) const |
Checks that the router supports the given set of roles. More... | |
bool | supportsFeatures (const FeatureMap &features) const |
Checks that the router supports the given map of features. More... | |
Authentication | |
Variant | authId () const |
Obtains the authentication ID the client was actually authenticated as. More... | |
Variant | authRole () const |
Obtains the role the client was authenticated for. More... | |
Variant | authMethod () const |
Obtains the method that was used for authentication. More... | |
Variant | authProvider () const |
Obtains the authentication provider. More... | |
Session information contained within WAMP WELCOME
messages.
String wamp::SessionInfo::agentString | ( | ) | const |
Obtains the agent string of the WAMP router, if available.
HELLO.Details.agent|string
detail, or an empty string if it is not available. Object wamp::SessionInfo::roles | ( | ) | const |
Obtains the WELCOME.Details.roles
dictionary for the router.
HELLO.Details.roles|dict
detail, or an empty Object if it is not available. bool wamp::SessionInfo::supportsRoles | ( | const RoleSet & | roles | ) | const |
Checks that the router supports the given set of roles.
Possible role strings include:
broker
dealer
bool wamp::SessionInfo::supportsFeatures | ( | const FeatureMap & | features | ) | const |
Checks that the router supports the given map of features.
Variant wamp::SessionInfo::authId | ( | ) | const |
Obtains the authentication ID the client was actually authenticated as.
This function returns the value of the HELLO.Details.authid|string
detail.
Variant wamp::SessionInfo::authRole | ( | ) | const |
Obtains the role the client was authenticated for.
This function returns the value of the HELLO.Details.authrole|string
detail. This is not to be confused with the dealer roles.
Variant wamp::SessionInfo::authMethod | ( | ) | const |
Obtains the method that was used for authentication.
This function returns the value of the HELLO.Details.authmethod|string
detail.
Variant wamp::SessionInfo::authProvider | ( | ) | const |
Obtains the authentication provider.
This function returns the value of the HELLO.Details.authprovider|string
detail.