AuthApi#
- class ansys.hps.client.auth.api.AuthApi(client)#
Provides a minimal wrapper around the Keycloak API to query user information.
- Parameters:
- client
Client
HPS client object.
- client
Examples
Get users whose first name contains
john
.>>> from ansys.hps.client import Client >>> from ansys.hps.client.auth import AuthApi, User >>> cl = Client( ... url="https://127.0.0.1:8443/hps", username="repuser", password="repuser" ... ) >>> auth_api = AuthApi(cl) >>> users = auth_api.get_users(firstName="john", exact=False)
Methods
AuthApi.get_user
(id[, as_object])Get the user representation for a given user ID.
Get the groups that the user belongs to.
Get the name of the groups that the user belongs to.
Get the realm roles for the user.
Get the name of the realm roles for the user.
AuthApi.get_users
([as_objects])Get users, filtered according to query parameters.
Determine if the user is a system administrator.
Attributes
Realm URL.
API URL.