deep.api.auth
Services for customizing auth connection.
AuthProvider
Bases: ABC
This is the abstract class to define an AuthProvider.
The 'provide' function will be called when the system needs to get an auth token.
Source code in deep/api/auth/__init__.py
__init__(config)
get_provider(config)
staticmethod
Get the provider to use.
Static function to load the correct auth provider based on the current config.
:param config: The agent config :return: the loaded provider :raises: UnknownAuthProvider if we cannot load the provider configured
Source code in deep/api/auth/__init__.py
provide()
abstractmethod
Provide the auth metadata.
This is called when we need to get the auth for the request.
:return: a list of tuples to be attached to the outbound request
BasicAuthProvider
Bases: AuthProvider
This is a provider for http basic auth. This expects the config to provide a username and password.
Source code in deep/api/auth/__init__.py
provide()
Provide the auth metadata.
This is called when we need to get the auth for the request.
:return: a list of tuples to be attached to the outbound request