Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::AuthenticatedUser Class Reference

Class representing an authenticated user. More...

#include <Security.h>

Public Member Functions

virtual std::string GetUsername ()
 The authenticated username.
virtual std::vector< std::string > GetPrivileges ()
 The user privileges.
virtual std::vector< std::string > GetProperties ()
 The user properties.
virtual boost::posix_time::ptime GetLoginTime ()
 The user login time.
virtual boost::posix_time::ptime GetLastAccessTime ()
 The user last access time.
 AuthenticatedUser (boost::string_ref username, const std::vector< std::string > &privileges, const std::vector< std::string > &properties, const boost::shared_ptr< ServerContext > &context)
 Construct a new AuthenticatedUser.
virtual void UpdateLastAccess ()
 Update the last access time to now.

Detailed Description

Class representing an authenticated user.

Use ServerEndpoint::GetCurrentAuthenticatedUser() to retrieve the authenticated user making a request

See Security for more information.

Constructor & Destructor Documentation

◆ AuthenticatedUser()

RobotRaconteur::AuthenticatedUser::AuthenticatedUser ( boost::string_ref username,
const std::vector< std::string > & privileges,
const std::vector< std::string > & properties,
const boost::shared_ptr< ServerContext > & context )

Construct a new AuthenticatedUser.

Must use boost::make_shared<AuthenticatedUser>()

Valid privileges are as follows:

Privilege Name Description
objectlock Allow user to lock objects
objectlockoverride Allow user to unlock object locks made by other users
Parameters
usernameThe username
privilegesThe user privileges
propertiesThe user properties
contextThe context of the service

The documentation for this class was generated from the following file: