dxlstreamingclient.auth module

Authentication APIs

exception dxlstreamingclient.auth.PermanentAuthenticationError

Bases: dxlstreamingclient.error.PermanentError

Exception raised when an error occurs during an authentication attempt due to the user being unauthorized.

exception dxlstreamingclient.auth.TemporaryAuthenticationError

Bases: dxlstreamingclient.error.TemporaryError

Exception raised when an unexpected/unknown (but possibly recoverable) error occurs during an authentication attempt.

dxlstreamingclient.auth.login(url, username, password, path_fragment='/identity/v1/login', verify_cert_bundle='')

Make a login request to the supplied login url.

Parameters:
  • url (str) -- Base URL at which to make the request.
  • username (str) -- User name to supply for request authentication.
  • password (str) -- Password to supply for request authentication.
  • path_fragment (str) -- Path to append to the base URL for the request.
  • verify_cert_bundle (str) -- Path to a CA bundle file containing certificates of trusted CAs. The CA bundle is used to validate that the certificate of the authentication server being connected to was signed by a valid authority. If set to an empty string, the server certificate is not validated.
Raises:
  • TemporaryAuthenticationError -- if an unexpected (but possibly recoverable) authentication error occurs for the request.
  • PermanentAuthenticationError -- if the request fails due to the user not being authenticated successfully or if the user is unauthorized to make the request.