Mercurial > hg > orthanc-python
changeset 333:10bc736775b1
give access to the authentication payload in the REST callbacks
| author | Sebastien Jodogne <s.jodogne@gmail.com> |
|---|---|
| date | Fri, 21 Aug 2026 15:14:47 +0200 |
| parents | 35d09327ee25 |
| children | ff7d48d8d51a |
| files | NEWS Sources/RestCallbacks.cpp |
| diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 **/
