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 | Static Private Member Functions
DtAuthInterceptor Class Reference

DtAuthInterceptor — oatpp request interceptor that enforces session key authentication on all REST API routes.

The interceptor returns a 401 response for any request to /api/* or /ws that lacks a valid Bearer session key in the Authorization header.

The following paths are always allowed without a session key:

The /ws path is intentionally passed through by this interceptor; the DtEntityWebSocketController validates the session key via the URL query parameter before performing the WebSocket handshake.

When DtWebServerSettings::accessControlEnabled is false, the interceptor passes every request through unconditionally.

Inheritance diagram for DtAuthInterceptor:
Inheritance graph
[legend]

Public Member Functions

std::shared_ptr< OutgoingResponse > intercept (const std::shared_ptr< IncomingRequest > &request) override
 

Static Private Member Functions

static bool requiresAuth (const std::string &path)
 
static std::shared_ptr
< OutgoingResponse > 
unauthorized (const std::string &message)
 

Member Function Documentation

std::shared_ptr<OutgoingResponse> DtAuthInterceptor::intercept ( const std::shared_ptr< IncomingRequest > &  request)
override
static bool DtAuthInterceptor::requiresAuth ( const std::string &  path)
staticprivate

Returns true if the path should be checked for a valid session key.

static std::shared_ptr<OutgoingResponse> DtAuthInterceptor::unauthorized ( const std::string &  message)
staticprivate

Builds a minimal JSON 401 response.


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)