# HG changeset patch # User Sebastien Jodogne # Date 1787318087 -7200 # Node ID 10bc736775b1a862917281cd8e3d335f209f1c86 # Parent 35d09327ee25d6cdbc0e33d5c197ad5aa572e3c3 give access to the authentication payload in the REST callbacks diff -r 35d09327ee25 -r 10bc736775b1 NEWS --- a/NEWS Fri Aug 21 13:25:30 2026 +0200 +++ b/NEWS Fri Aug 21 15:14:47 2026 +0200 @@ -5,6 +5,8 @@ => Minimum SDK version: 1.7.2 <= * Wrapped OrthancPluginRegisterHttpAuthentication() as orthanc.RegisterHttpAuthentication() +* Give access to the authentication payload in the REST callbacks, + which requires Orthanc SDK 1.12.9 * Wrapped DicomInsante.GetInstanceRemoteIp() and DicomInsante.GetInstanceCalledAet(), which requires Orthanc SDK 1.13.1 (not released yet) diff -r 35d09327ee25 -r 10bc736775b1 Sources/RestCallbacks.cpp --- a/Sources/RestCallbacks.cpp Fri Aug 21 13:25:30 2026 +0200 +++ b/Sources/RestCallbacks.cpp Fri Aug 21 15:14:47 2026 +0200 @@ -186,6 +186,13 @@ PyDict_SetItemString(kw.GetPyObject(), "body", bytes.GetPyObject()); } +#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 9) + { + PythonBytes bytes(lock, request->authenticationPayload, request->authenticationPayloadSize); + PyDict_SetItemString(kw.GetPyObject(), "authentication_payload", bytes.GetPyObject()); + } +#endif + /** * Call the user-defined function **/