dicomweb-client icon indicating copy to clipboard operation
dicomweb-client copied to clipboard

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

Open hackermd opened this issue 2 years ago • 0 comments

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:

  • ConfidentialClientSession for confidential clients using the OAuth 2.0 Client Credentials grant type
  • PublicClientSession for public clients using the OAuth 2.0 Authorization Code grant type with Proof Key for Code Exchange (PKCE) challenge

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).

hackermd avatar May 03 '22 21:05 hackermd