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:
urlstr, optional

Base path for the server to call. The default is 'https://127.0.0.1:8443/rep'.

realmstr, optional

Keycloak realm. The default is 'rep'.

grant_type: str, optional

Authentication method. The default is 'password'.

scopestr, optional

String containing one or more requested scopes. The default is 'openid'.

client_idstr, optional

Client type. The default is 'rep-cli'.

client_secretstr, optional

Client secret. The default is None.

usernamestr, optional

Username.

passwordstr, optional.

Password.

refresh_tokenstr, optional

Refresh token.

timeoutfloat, 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.

Returns:
dict

JSON-encoded content of a requests.Response object.