authenticate#
- ansys.hps.client.authenticate.authenticate(auth_url='https://127.0.0.1:8443/hps/auth/realms/rep', grant_type='password', scope='openid', client_id='rep-cli', client_secret=None, username=None, password=None, refresh_token=None, timeout=10.0, verify=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://127.0.0.1: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.