Function ros2_medkit_gateway::http::detail::write_oauth2_error
Defined in File primitives.hpp
Function Documentation
-
void ros2_medkit_gateway::http::detail::write_oauth2_error(FrameworkOrPluginAccess token, httplib::Response &res, const ErrorInfo &err)
Write an OAuth 2.0 RFC 6749 error response.
Body shape (per RFC 6749 §5.2):
Used only by the auth endpoints ({ "error": "<code>", "error_description": "<message>" }
/auth/token,/auth/revoke) which by spec must speak the OAuth2 error shape, not the SOVD GenericError shape. Theerrorfield carries the snake_case OAuth2 error code, not the SOVDerror_codekey. There is noparameterswrapper.- Parameters:
token – Framework access token (constructible only by friends).
res – HTTP response to mutate.
err – Transport-neutral error descriptor.
err.http_statusis clamped into the SOVD range 400-599.