client.authenticate#
This module provides authentication for the user with a password or refresh token against the HPS authentication service.
Attributes#
Functions#
|
Authenticates the user with a password or refresh token against the HPS authentication service. |
Module Contents#
- client.authenticate.log#
- client.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)#
Authenticates 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
,optional
Base path for the server to call. The default is
'https://localhost:8443/rep'
.- realm
str
,optional
Keycloak realm. The default is
'rep'
.- grant_type: str, optional
Authentication method. The default is
'password'
.- scope
str
,optional
String containing one or more requested scopes. The default is
'openid'
.- client_id
str
,optional
Client type. The default is
'rep-cli'
.- client_secret
str
,optional
Client secret. The default is
None
.- username
str
,optional
Username.
- password
str
, optional. Password.
- refresh_token
str
,optional
Refresh token.
- timeout
float
,optional
Timeout in seconds. The default is
10.0
.- verify: Union[bool, str], optional
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
- Returns:
dict
JSON-encoded content of a
requests.Response
object.