Basic
Implements basic authoriser flows.
Classes:
|
Authorise HTTP requests using basic authentication i.e. username + password (optional). |
- class aiorequestful.auth.basic.BasicAuthoriser(login, password='', encoding='latin1', service_name='unknown_service')
Bases:
AuthoriserAuthorise HTTP requests using basic authentication i.e. username + password (optional)
- Parameters:
service_name (
str(default:'unknown_service')) – The service name for which to authorise.login (
str) – The login ID of the credentials.password (
str(default:'')) – The login password.encoding (
str(default:'latin1')) – The encoding to apply to credentials when sending requests.
Attributes:
The login ID of the credentials.
The login password.
The encoding to apply to credentials when sending requests.
Methods:
Authenticate and authorise, testing/refreshing/re-authorising as needed.
- login
The login ID of the credentials.
- password
The login password.
- encoding
The encoding to apply to credentials when sending requests.
- async authorise()
Authenticate and authorise, testing/refreshing/re-authorising as needed.
- Raises:
AuthoriserError – If the authorisation failed to generate valid a token if needed, or if the tests continue to fail despite authorising/re-authorising.
- Return type:
dict[str,str]