The authenticate.py
module#
Summary#
Authenticate the user with a password or refresh token against the HPS authentication service. |
Description#
Provides authentication for the user with a password or refresh token.
This module interacts with the HPS authentication service.
Module detail#
- authenticate.authenticate(url: str = 'https://localhost:8443/hps', realm: str = 'rep', grant_type: str = 'password', scope='openid', client_id: str = 'rep-cli', client_secret: str = None, username: str = None, password: str = None, refresh_token: str = None, timeout: float = 10.0, verify: bool | str = True, **kwargs)#
Authenticate the user with a password or refresh token against the HPS authentication service.
If this method is successful, the response includes access and refresh tokens.
- Parameters:
- url
str
, default: ‘https://localhost:8443/hps’ Base path for the server to call.
- realm
str
, default: ‘rep’ Name of the Keycloak realm.
- grant_type: str, default: ‘password’
Authentication method.
- scope
str
, default: ‘openid’ String containing one or more requested scopes.
- client_id
str
, default: ‘rep-cli’ Client type.
- client_secret
str
, default:None
Client secret.
- username
str
Username.
- password
str
Password.
- refresh_token
str
Refresh token.
- timeout
float
, default: 10.0 Timeout in seconds.
- verify: Union[bool, str]
If a Boolean, whether to verify the server’s TLS certificate. If a string, the path to the CA bundle to use. For more information, see the
requests.Session
documentation.
- url
- authenticate.log#