Auth¶
These classes are used for adding auth information to requests send from client.
LoginPassword
¶
Authorization using OAuth2 + grant_type=password.
Resulting access is passed in Authorization: Bearer ${token} header.
Tokens can be refreshed.
Parameters:
-
(login¶str) –User name
-
(password¶SecretStr) –User password
-
(type¶Literal['login_password'], default:'login_password') –
Examples:
>>> from horizon.client.auth import LoginPassword
>>> auth = LoginPassword(login="me", password="12345")
AccessToken
¶
Authorization using access token.
Token is passed in Authorization: Bearer ${token} header,
and does not support refreshing.
Parameters:
Examples:
>>> from horizon.client.auth import AccessToken
>>> auth = AccessToken(token="my.access.token")