![]() |
VR-Forces Developer's Guide
|
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.

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) |
|
override |
|
staticprivate |
Returns true if the path should be checked for a valid session key.
|
staticprivate |
Builds a minimal JSON 401 response.