Authorizer¶
Bases:
Exception
Authentication error.
Bases:
puddle.client.auth.base_authorizer.BaseAuthorizer
Environment variable from which the api key id is read.
Environment variable from which the api secret key is read.
- Return type
dict
- Returns
Dict with all required headers, including auth header.
Executes the login to Puddle.
Logs out from Puddle.
This gets invoked before a request is made. This is a good place to make sure that for example auth tokens are valid. :type url:
str
:param url: :type body:bytes
:param body: :type headers:dict
:param headers:
This gets invoked after obtaining a response from server. This is a good place to read the response headers for example. :type resp:
HTTPResponse
:param resp:
- Return type
str
- Returns
Backend server address used by this Authorizer.
- Return type
Optional
[str
]- Returns
Puddle auth token, might be None.