VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions
DtAuthController Class Reference

DtAuthController — REST endpoints for user authentication.

Routes: POST /auth/login — exchange a username for a session key POST /auth/logout — invalidate the current session key

When access control is disabled, the login endpoint still works and returns a session key, but carrying that key is optional for all other requests.

Login request body (JSON):

{ "username": "admin", "password": "secret" }

The "password" field is optional. If the account has no password set, it is ignored.

Login response body (JSON, HTTP 200):

{ "sessionKey": "...", "username": "admin", "permissions": ["scenario.write", ...] }

Error response body (JSON, HTTP 401):

{ "error": "Invalid credentials" }
Inheritance diagram for DtAuthController:
Inheritance graph
[legend]

Public Member Functions

 DtAuthController (const std::shared_ptr< ObjectMapper > &objectMapper)
 
 ENDPOINT_INFO (login)
 
 ENDPOINT_INFO (logout)
 

Private Member Functions

std::shared_ptr< OutgoingResponse > handleLogin (const std::shared_ptr< IncomingRequest > &req)
 
std::shared_ptr< OutgoingResponse > handleLogout (const std::shared_ptr< IncomingRequest > &req)
 

Constructor & Destructor Documentation

DtAuthController::DtAuthController ( const std::shared_ptr< ObjectMapper > &  objectMapper)
inlineexplicit

Member Function Documentation

DtAuthController::ENDPOINT_INFO ( login  )
inline
DtAuthController::ENDPOINT_INFO ( logout  )
inline
std::shared_ptr<OutgoingResponse> DtAuthController::handleLogin ( const std::shared_ptr< IncomingRequest > &  req)
private
std::shared_ptr<OutgoingResponse> DtAuthController::handleLogout ( const std::shared_ptr< IncomingRequest > &  req)
private

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)