ImagingDataCommons / dicomweb-client

Python client for DICOMweb RESTful services
https://dicomweb-client.readthedocs.io
MIT License
110 stars 38 forks source link

Add session utils for authentication and authorization using OpenID Connect (OIDC) #67

Open hackermd opened 2 years ago

hackermd commented 2 years ago

This PR implements utilities to create authorized requests.Session objects using OpenID Connect (OIDC).

It introduces two public classes that are both derived from requests.Session:

It further adds the utility function create_session_from_client_credentials() that facilitates the creation of instances of the above classes given corresponding client credentials (ConfidentialClientCredentials or PublicClientCredentials).