Skip to content

Commit 094b583

Browse files
committed
Add section to user guide of documentation
1 parent 33427da commit 094b583

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/usage.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ You can specify these prefixes using ``qido_url_prefix``, ``wado_url_prefix``, a
3434
stow_url_prefix="stowrs"
3535
)
3636
37+
.. _auth:
38+
39+
Authentication and authorization
40+
++++++++++++++++++++++++++++++++
3741

3842
To interact with servers requiring authentication, ``DICOMwebClient`` accepts arbitrary authentication handlers derived from ``requests.auth.AuthBase`` (see `here <http://docs.python-requests.org/en/master/user/authentication/>`_ for details).
3943

@@ -43,15 +47,15 @@ To interact with servers requiring authentication, ``DICOMwebClient`` accepts ar
4347
from dicomweb_client.api import DICOMwebClient
4448
from dicomweb_client.session_utils import create_session_from_auth
4549
46-
auth=HTTPBasicAuth('myusername', 'mypassword')
50+
auth = HTTPBasicAuth('myusername', 'mypassword')
4751
session = create_session_from_auth(auth)
4852
4953
client = DICOMwebClient(
5054
url="https://mydicomwebserver.com",
5155
session=session
5256
)
5357
54-
To simplify usage for ``HTTPBasicAuth``, you may also directly provide a username and password using the corresponding arguments.
58+
To simplify usage for basic HTTP authentication, you may also directly provide a username and password using the corresponding arguments.
5559

5660
.. code-block:: python
5761
@@ -101,7 +105,7 @@ To interact with servers requiring certificate-based authentication, you can pro
101105
client = DICOMwebClient(url="https://mydicomwebserver.com")
102106
103107
104-
To interact with a server of the Google Healthcare API requiring OpenID Connect based authentication and authorization provide a session authenticated using the Google Cloud Platform (GCP) credentials.
108+
To interact with a server of the Google Healthcare API requiring OpenID Connect based authentication and authorization, provide a session authenticated using the Google Cloud Platform (GCP) credentials.
105109
See `GCP documentation <https://cloud.google.com/docs/authentication/production>`_ for details.
106110

107111
Note that GCP authentication requires installation of the package distribution with the ``gcp`` extra requirements: ``$ pip install dicomweb-client[gcp]``.

0 commit comments

Comments
 (0)