changeset 878:2e3493d618ad

auth 0.3.0
author Alain Mazy <am@osimis.io>
date Mon, 26 Sep 2022 19:13:45 +0200
parents 900033cffeb2
children f4b3e015d57f
files Sphinx/source/plugins/authorization.rst
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Sphinx/source/plugins/authorization.rst	Mon Sep 26 19:13:38 2022 +0200
+++ b/Sphinx/source/plugins/authorization.rst	Mon Sep 26 19:13:45 2022 +0200
@@ -52,7 +52,10 @@
       "/home/user/OrthancAuthorization/Build/libOrthancAuthorization.so"
     ],
     "Authorization" : {
-      "WebService" : "http://localhost:8000/"
+      "WebService" : "http://localhost:8000/",
+      "WebServiceUsername": "my-user",
+      "WebServicePassword": "my-password",
+      "WebServiceIdentifier": "my-id"
     }
   }
 
@@ -86,7 +89,8 @@
     "dicom-uid" : "123ABC",
     "level" : "patient",
     "method" : "get",
-    "orthanc-id" : "6eeded74-75005003-c3ae9738-d4a06a4f-6beedeb8"
+    "orthanc-id" : "6eeded74-75005003-c3ae9738-d4a06a4f-6beedeb8",
+    "identifier": "my-id"
   }
 
 In this example, the user is accessing an URI that is related to some
@@ -109,6 +113,9 @@
   contains its ``SOPInstanceUID``.
 * The ``orthanc-id`` field gives the :ref:`Orthanc identifier
   <orthanc-ids>` of the resource.
+* The ``identifier`` field contains the value of the ``WebServiceIdentifier``
+  configuration or ``null`` if this configuration is not defined.  This allows
+  the WebService to identity which Orthanc instance is calling it (new in v 0.3.0).
 
 When the user accesses a lower-level resource in the DICOM hierarchy
 (a study, a series or an instance), the authorization plugin will
@@ -273,6 +280,9 @@
     [...]
     "Authorization" : {
       "WebService" : "http://localhost:8000/",
+      "WebServiceUsername": "my-user",          // new in v 0.3.0
+      "WebServicePassword": "my-password",      // new in v 0.3.0
+      "WebServiceIdentifier": "my-id",          // new in v 0.3.0
       "TokenGetArguments" : [ "user" ],
       "TokenHttpHeaders" : [ "hello" ],
       "UncheckedResources" : [