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)#
Authenticate the user against the HPS authentication service.
If this method is successful, the response includes access and refresh tokens.
- Parameters:
- auth_url
str,optional Authentication url.
- 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.Sessiondocumentation.- kwargs
dict,optional Additional keyword arguments to pass to the authentication endpoint.
- auth_url
- Returns:
dictJSON-encoded content of a
requests.Responseobject.