Browse Source

docs: update all links to latest keycloak doc

pull/294/head
Florian Best 3 years ago
parent
commit
c00b8f57d7
  1. 170
      keycloak/keycloak_admin.py

170
keycloak/keycloak_admin.py

@ -248,7 +248,7 @@ class KeycloakAdmin:
Import a new realm from a RealmRepresentation. Realm name must be unique. Import a new realm from a RealmRepresentation. Realm name must be unique.
RealmRepresentation RealmRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_realmrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_realmrepresentation
:param payload: RealmRepresentation :param payload: RealmRepresentation
@ -264,7 +264,7 @@ class KeycloakAdmin:
Export the realm configurations in the json format Export the realm configurations in the json format
RealmRepresentation RealmRepresentation
https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_partialexport
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_partialexport
:param export-clients: Skip if not want to export realm clients :param export-clients: Skip if not want to export realm clients
:param export-groups-and-roles: Skip if not want to export realm groups and roles :param export-groups-and-roles: Skip if not want to export realm groups and roles
@ -289,7 +289,7 @@ class KeycloakAdmin:
Create a realm Create a realm
RealmRepresentation: RealmRepresentation:
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_realmrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_realmrepresentation
:param payload: RealmRepresentation :param payload: RealmRepresentation
:param skip_exists: Skip if Realm already exist. :param skip_exists: Skip if Realm already exist.
@ -306,7 +306,7 @@ class KeycloakAdmin:
role, or client information in the payload. role, or client information in the payload.
RealmRepresentation: RealmRepresentation:
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_realmrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_realmrepresentation
:param realm_name: Realm name (not the realm id) :param realm_name: Realm name (not the realm id)
:param payload: RealmRepresentation :param payload: RealmRepresentation
@ -335,7 +335,7 @@ class KeycloakAdmin:
Return a list of users, filtered according to query parameters Return a list of users, filtered according to query parameters
UserRepresentation UserRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_userrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_userrepresentation
:param query: Query parameters (optional) :param query: Query parameters (optional)
:return: users list :return: users list
@ -354,7 +354,7 @@ class KeycloakAdmin:
Create an ID Provider, Create an ID Provider,
IdentityProviderRepresentation IdentityProviderRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_identityproviderrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_identityproviderrepresentation
:param: payload: IdentityProviderRepresentation :param: payload: IdentityProviderRepresentation
""" """
@ -368,7 +368,7 @@ class KeycloakAdmin:
Create an ID Provider, Create an ID Provider,
IdentityProviderRepresentation IdentityProviderRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_identityprovidermapperrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_identityprovidermapperrepresentation
:param: idp_alias: alias for Idp to add mapper in :param: idp_alias: alias for Idp to add mapper in
:param: payload: IdentityProviderMapperRepresentation :param: payload: IdentityProviderMapperRepresentation
@ -383,7 +383,7 @@ class KeycloakAdmin:
Returns a list of ID Providers, Returns a list of ID Providers,
IdentityProviderRepresentation IdentityProviderRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_identityproviderrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_identityproviderrepresentation
:return: array IdentityProviderRepresentation :return: array IdentityProviderRepresentation
""" """
@ -406,7 +406,7 @@ class KeycloakAdmin:
Create a new user. Username must be unique Create a new user. Username must be unique
UserRepresentation UserRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_userrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_userrepresentation
:param payload: UserRepresentation :param payload: UserRepresentation
:param exist_ok: If False, raise KeycloakGetError if username already exists. Otherwise, return existing user ID. :param exist_ok: If False, raise KeycloakGetError if username already exists. Otherwise, return existing user ID.
@ -443,7 +443,7 @@ class KeycloakAdmin:
This is required for further actions against this user. This is required for further actions against this user.
UserRepresentation UserRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_userrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_userrepresentation
:param username: id in UserRepresentation :param username: id in UserRepresentation
@ -460,7 +460,7 @@ class KeycloakAdmin:
:param user_id: User id :param user_id: User id
UserRepresentation UserRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_userrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_userrepresentation
:return: UserRepresentation :return: UserRepresentation
""" """
@ -511,8 +511,8 @@ class KeycloakAdmin:
Set up a password for the user. If temporary is True, the user will have to reset Set up a password for the user. If temporary is True, the user will have to reset
the temporary password next time they log in. the temporary password next time they log in.
https://www.keycloak.org/docs-api/8.0/rest-api/#_users_resource
https://www.keycloak.org/docs-api/8.0/rest-api/#_credentialrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_users_resource
https://www.keycloak.org/docs-api/17.0/rest-api/#_credentialrepresentation
:param user_id: User id :param user_id: User id
:param password: New password :param password: New password
@ -531,7 +531,7 @@ class KeycloakAdmin:
Returns a list of credential belonging to the user. Returns a list of credential belonging to the user.
CredentialRepresentation CredentialRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_credentialrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_credentialrepresentation
:param: user_id: user id :param: user_id: user id
:return: Keycloak server response (CredentialRepresentation) :return: Keycloak server response (CredentialRepresentation)
@ -545,7 +545,7 @@ class KeycloakAdmin:
Get credential of the user. Get credential of the user.
CredentialRepresentation CredentialRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_credentialrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_credentialrepresentation
:param: user_id: user id :param: user_id: user id
:param: credential_id: credential id :param: credential_id: credential id
@ -560,7 +560,7 @@ class KeycloakAdmin:
Delete credential of the user. Delete credential of the user.
CredentialRepresentation CredentialRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_credentialrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_credentialrepresentation
:param: user_id: user id :param: user_id: user id
:param: credential_id: credential id :param: credential_id: credential id
@ -574,7 +574,7 @@ class KeycloakAdmin:
""" """
Logs out user. Logs out user.
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_logout
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_logout
:param user_id: User id :param user_id: User id
:return: :return:
@ -674,7 +674,7 @@ class KeycloakAdmin:
:param user_id: id of user :param user_id: id of user
UserSessionRepresentation UserSessionRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_usersessionrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_usersessionrepresentation
:return: UserSessionRepresentation :return: UserSessionRepresentation
""" """
@ -687,7 +687,7 @@ class KeycloakAdmin:
Get themes, social providers, auth providers, and event listeners available on this server Get themes, social providers, auth providers, and event listeners available on this server
ServerInfoRepresentation ServerInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_serverinforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_serverinforepresentation
:return: ServerInfoRepresentation :return: ServerInfoRepresentation
""" """
@ -699,7 +699,7 @@ class KeycloakAdmin:
Returns a list of groups belonging to the realm Returns a list of groups belonging to the realm
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:return: array GroupRepresentation :return: array GroupRepresentation
""" """
@ -717,7 +717,7 @@ class KeycloakAdmin:
Get group by id. Returns full group details Get group by id. Returns full group details
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:param group_id: The group id :param group_id: The group id
:return: Keycloak server response (GroupRepresentation) :return: Keycloak server response (GroupRepresentation)
@ -731,7 +731,7 @@ class KeycloakAdmin:
Utility function to iterate through nested group structures Utility function to iterate through nested group structures
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:param name: group (GroupRepresentation) :param name: group (GroupRepresentation)
:param path: group path (string) :param path: group path (string)
@ -755,10 +755,10 @@ class KeycloakAdmin:
Get members by group id. Returns group members Get members by group id. Returns group members
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_userrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_userrepresentation
:param group_id: The group id :param group_id: The group id
:param query: Additional query parameters (see https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_getmembers)
:param query: Additional query parameters (see https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getmembers)
:return: Keycloak server response (UserRepresentation) :return: Keycloak server response (UserRepresentation)
""" """
params_path = {"realm-name": self.realm_name, "id": group_id} params_path = {"realm-name": self.realm_name, "id": group_id}
@ -776,7 +776,7 @@ class KeycloakAdmin:
Subgroups are traversed, the first to match path (or name with path) is returned. Subgroups are traversed, the first to match path (or name with path) is returned.
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:param path: group path :param path: group path
:param search_in_subgroups: True if want search in the subgroups :param search_in_subgroups: True if want search in the subgroups
@ -807,7 +807,7 @@ class KeycloakAdmin:
:param skip_exists: If true then do not raise an error if it already exists :param skip_exists: If true then do not raise an error if it already exists
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:return: Http response :return: Http response
""" """
@ -831,7 +831,7 @@ class KeycloakAdmin:
:param payload: GroupRepresentation with updated information. :param payload: GroupRepresentation with updated information.
GroupRepresentation GroupRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/#_grouprepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/#_grouprepresentation
:return: Http response :return: Http response
""" """
@ -898,7 +898,7 @@ class KeycloakAdmin:
Returns a list of clients belonging to the realm Returns a list of clients belonging to the realm
ClientRepresentation ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response (ClientRepresentation) :return: Keycloak server response (ClientRepresentation)
""" """
@ -912,7 +912,7 @@ class KeycloakAdmin:
Get representation of the client Get representation of the client
ClientRepresentation ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param client_id: id of client (not client-id) :param client_id: id of client (not client-id)
:return: Keycloak server response (ClientRepresentation) :return: Keycloak server response (ClientRepresentation)
@ -928,7 +928,7 @@ class KeycloakAdmin:
This is required for further actions against this client. This is required for further actions against this client.
:param client_name: name in ClientRepresentation :param client_name: name in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: client_id (uuid as string) :return: client_id (uuid as string)
""" """
@ -945,7 +945,7 @@ class KeycloakAdmin:
Get authorization json from client. Get authorization json from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -958,9 +958,9 @@ class KeycloakAdmin:
Create resources of client. Create resources of client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param payload: ResourceRepresentation :param payload: ResourceRepresentation
https://www.keycloak.org/docs-api/12.0/rest-api/index.html#_resourcerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_resourcerepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -977,7 +977,7 @@ class KeycloakAdmin:
Get resources from client. Get resources from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -990,7 +990,7 @@ class KeycloakAdmin:
Create role-based policy of client. Create role-based policy of client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param payload: No Document :param payload: No Document
payload example: payload example:
payload={ payload={
@ -1020,9 +1020,9 @@ class KeycloakAdmin:
Create resource-based permission of client. Create resource-based permission of client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param payload: PolicyRepresentation :param payload: PolicyRepresentation
https://www.keycloak.org/docs-api/12.0/rest-api/index.html#_policyrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_policyrepresentation
payload example: payload example:
payload={ payload={
"type": "resource", "type": "resource",
@ -1051,7 +1051,7 @@ class KeycloakAdmin:
Get scopes from client. Get scopes from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -1064,7 +1064,7 @@ class KeycloakAdmin:
Get permissions from client. Get permissions from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -1077,7 +1077,7 @@ class KeycloakAdmin:
Get policies from client. Get policies from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: Keycloak server response :return: Keycloak server response
""" """
@ -1090,7 +1090,7 @@ class KeycloakAdmin:
Get service account user from client. Get service account user from client.
:param client_id: id in ClientRepresentation :param client_id: id in ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:return: UserRepresentation :return: UserRepresentation
""" """
@ -1102,7 +1102,7 @@ class KeycloakAdmin:
""" """
Create a client Create a client
ClientRepresentation: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
ClientRepresentation: https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param skip_exists: If true then do not raise an error if client already exists :param skip_exists: If true then do not raise an error if client already exists
:param payload: ClientRepresentation :param payload: ClientRepresentation
@ -1133,7 +1133,7 @@ class KeycloakAdmin:
Get representation of the client Get representation of the client
ClientRepresentation ClientRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_clientrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clientrepresentation
:param client_id: keycloak client id (not oauth client-id) :param client_id: keycloak client id (not oauth client-id)
:return: Keycloak server response (ClientRepresentation) :return: Keycloak server response (ClientRepresentation)
@ -1148,10 +1148,10 @@ class KeycloakAdmin:
Get content for given installation provider Get content for given installation provider
Related documentation: Related documentation:
https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_clients_resource
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clients_resource
Possible provider_id list available in the ServerInfoRepresentation#clientInstallations Possible provider_id list available in the ServerInfoRepresentation#clientInstallations
https://www.keycloak.org/docs-api/5.0/rest-api/index.html#_serverinforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_serverinforepresentation
:param client_id: Client id :param client_id: Client id
:param provider_id: provider id to specify response format :param provider_id: provider id to specify response format
@ -1166,7 +1166,7 @@ class KeycloakAdmin:
Get all roles for the realm or client Get all roles for the realm or client
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:return: Keycloak server response (RoleRepresentation) :return: Keycloak server response (RoleRepresentation)
""" """
@ -1179,7 +1179,7 @@ class KeycloakAdmin:
""" """
Get role members of realm by role name. Get role members of realm by role name.
:param role_name: Name of the role. :param role_name: Name of the role.
:param query: Additional Query parameters (see https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_roles_resource)
:param query: Additional Query parameters (see https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_roles_resource)
:return: Keycloak Server Response (UserRepresentation) :return: Keycloak Server Response (UserRepresentation)
""" """
params_path = {"realm-name": self.realm_name, "role-name":role_name} params_path = {"realm-name": self.realm_name, "role-name":role_name}
@ -1192,7 +1192,7 @@ class KeycloakAdmin:
:param client_id: id of client (not client-id) :param client_id: id of client (not client-id)
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:return: Keycloak server response (RoleRepresentation) :return: Keycloak server response (RoleRepresentation)
""" """
@ -1210,7 +1210,7 @@ class KeycloakAdmin:
:param role_name: roles name (not id!) :param role_name: roles name (not id!)
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:return: role_id :return: role_id
""" """
@ -1229,7 +1229,7 @@ class KeycloakAdmin:
:param role_name: roles name (not id!) :param role_name: roles name (not id!)
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:return: role_id :return: role_id
""" """
@ -1241,7 +1241,7 @@ class KeycloakAdmin:
Create a client role Create a client role
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:param client_role_id: id of client (not client-id) :param client_role_id: id of client (not client-id)
:param payload: RoleRepresentation :param payload: RoleRepresentation
@ -1275,7 +1275,7 @@ class KeycloakAdmin:
Delete a client role Delete a client role
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:param client_role_id: id of client (not client-id) :param client_role_id: id of client (not client-id)
:param role_name: roles name (not id!) :param role_name: roles name (not id!)
@ -1305,7 +1305,7 @@ class KeycloakAdmin:
Get members by client role . Get members by client role .
:param client_id: The client id :param client_id: The client id
:param role_name: the name of role to be queried. :param role_name: the name of role to be queried.
:param query: Additional query parameters ( see https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_clients_resource)
:param query: Additional query parameters ( see https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_clients_resource)
:return: Keycloak server response (UserRepresentation) :return: Keycloak server response (UserRepresentation)
""" """
params_path = {"realm-name": self.realm_name, "id":client_id, "role-name":role_name} params_path = {"realm-name": self.realm_name, "id":client_id, "role-name":role_name}
@ -1332,7 +1332,7 @@ class KeycloakAdmin:
:param role_name: role's name, not id! :param role_name: role's name, not id!
RoleRepresentation RoleRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_rolerepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_rolerepresentation
:return: role_id :return: role_id
""" """
params_path = {"realm-name": self.realm_name, "role-name": role_name} params_path = {"realm-name": self.realm_name, "role-name": role_name}
@ -1614,7 +1614,7 @@ class KeycloakAdmin:
Get authentication flows. Returns all flow details Get authentication flows. Returns all flow details
AuthenticationFlowRepresentation AuthenticationFlowRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationflowrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationflowrepresentation
:return: Keycloak server response (AuthenticationFlowRepresentation) :return: Keycloak server response (AuthenticationFlowRepresentation)
""" """
@ -1627,7 +1627,7 @@ class KeycloakAdmin:
Get one authentication flow by it's id/alias. Returns all flow details Get one authentication flow by it's id/alias. Returns all flow details
AuthenticationFlowRepresentation AuthenticationFlowRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationflowrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationflowrepresentation
:param flow_id: the id of a flow NOT it's alias :param flow_id: the id of a flow NOT it's alias
:return: Keycloak server response (AuthenticationFlowRepresentation) :return: Keycloak server response (AuthenticationFlowRepresentation)
@ -1641,7 +1641,7 @@ class KeycloakAdmin:
Create a new authentication flow Create a new authentication flow
AuthenticationFlowRepresentation AuthenticationFlowRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationflowrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationflowrepresentation
:param payload: AuthenticationFlowRepresentation :param payload: AuthenticationFlowRepresentation
:param skip_exists: If true then do not raise an error if authentication flow already exists :param skip_exists: If true then do not raise an error if authentication flow already exists
@ -1672,7 +1672,7 @@ class KeycloakAdmin:
Delete authentication flow Delete authentication flow
AuthenticationInfoRepresentation AuthenticationInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationinforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationinforepresentation
:param flow_id: authentication flow id :param flow_id: authentication flow id
:return: Keycloak server response :return: Keycloak server response
@ -1697,7 +1697,7 @@ class KeycloakAdmin:
Update an authentication flow execution Update an authentication flow execution
AuthenticationExecutionInfoRepresentation AuthenticationExecutionInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationexecutioninforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationexecutioninforepresentation
:param payload: AuthenticationExecutionInfoRepresentation :param payload: AuthenticationExecutionInfoRepresentation
:param flow_alias: The flow alias :param flow_alias: The flow alias
@ -1714,7 +1714,7 @@ class KeycloakAdmin:
Get authentication flow execution. Get authentication flow execution.
AuthenticationExecutionInfoRepresentation AuthenticationExecutionInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationexecutioninforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationexecutioninforepresentation
:param execution_id: the execution ID :param execution_id: the execution ID
:return: Response(json) :return: Response(json)
@ -1728,7 +1728,7 @@ class KeycloakAdmin:
Create an authentication flow execution Create an authentication flow execution
AuthenticationExecutionInfoRepresentation AuthenticationExecutionInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationexecutioninforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationexecutioninforepresentation
:param payload: AuthenticationExecutionInfoRepresentation :param payload: AuthenticationExecutionInfoRepresentation
:param flow_alias: The flow alias :param flow_alias: The flow alias
@ -1745,7 +1745,7 @@ class KeycloakAdmin:
Delete authentication flow execution Delete authentication flow execution
AuthenticationExecutionInfoRepresentation AuthenticationExecutionInfoRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationexecutioninforepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationexecutioninforepresentation
:param execution_id: keycloak client id (not oauth client-id) :param execution_id: keycloak client id (not oauth client-id)
:return: Keycloak server response (json) :return: Keycloak server response (json)
@ -1759,7 +1759,7 @@ class KeycloakAdmin:
Create a new sub authentication flow for a given authentication flow Create a new sub authentication flow for a given authentication flow
AuthenticationFlowRepresentation AuthenticationFlowRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticationflowrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticationflowrepresentation
:param payload: AuthenticationFlowRepresentation :param payload: AuthenticationFlowRepresentation
:param flow_alias: The flow alias :param flow_alias: The flow alias
@ -1788,7 +1788,7 @@ class KeycloakAdmin:
Update an authenticator configuration. Update an authenticator configuration.
AuthenticatorConfigRepresentation AuthenticatorConfigRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authenticatorconfigrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authenticatorconfigrepresentation
:param payload: AuthenticatorConfigRepresentation :param payload: AuthenticatorConfigRepresentation
:param config_id: Authenticator config id :param config_id: Authenticator config id
@ -1802,7 +1802,7 @@ class KeycloakAdmin:
def delete_authenticator_config(self, config_id): def delete_authenticator_config(self, config_id):
""" """
Delete a authenticator configuration. Delete a authenticator configuration.
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_authentication_management_resource
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_authentication_management_resource
:param config_id: Authenticator config id :param config_id: Authenticator config id
:return: Keycloak server Response :return: Keycloak server Response
@ -1832,7 +1832,7 @@ class KeycloakAdmin:
def get_client_scopes(self): def get_client_scopes(self):
""" """
Get representation of the client scopes for the realm where we are connected to Get representation of the client scopes for the realm where we are connected to
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_getclientscopes
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getclientscopes
:return: Keycloak server response Array of (ClientScopeRepresentation) :return: Keycloak server response Array of (ClientScopeRepresentation)
""" """
@ -1844,7 +1844,7 @@ class KeycloakAdmin:
def get_client_scope(self, client_scope_id): def get_client_scope(self, client_scope_id):
""" """
Get representation of the client scopes for the realm where we are connected to Get representation of the client scopes for the realm where we are connected to
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_getclientscopes
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getclientscopes
:param client_scope_id: The id of the client scope :param client_scope_id: The id of the client scope
:return: Keycloak server response (ClientScopeRepresentation) :return: Keycloak server response (ClientScopeRepresentation)
@ -1858,7 +1858,7 @@ class KeycloakAdmin:
""" """
Create a client scope Create a client scope
ClientScopeRepresentation: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_getclientscopes
ClientScopeRepresentation: https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getclientscopes
:param payload: ClientScopeRepresentation :param payload: ClientScopeRepresentation
:param skip_exists: If true then do not raise an error if client scope already exists :param skip_exists: If true then do not raise an error if client scope already exists
@ -1874,7 +1874,7 @@ class KeycloakAdmin:
""" """
Update a client scope Update a client scope
ClientScopeRepresentation: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_client_scopes_resource
ClientScopeRepresentation: https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_client_scopes_resource
:param client_scope_id: The id of the client scope :param client_scope_id: The id of the client scope
:param payload: ClientScopeRepresentation :param payload: ClientScopeRepresentation
@ -1889,7 +1889,7 @@ class KeycloakAdmin:
def add_mapper_to_client_scope(self, client_scope_id, payload): def add_mapper_to_client_scope(self, client_scope_id, payload):
""" """
Add a mapper to a client scope Add a mapper to a client scope
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_create_mapper
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_create_mapper
:param client_scope_id: The id of the client scope :param client_scope_id: The id of the client scope
:param payload: ProtocolMapperRepresentation :param payload: ProtocolMapperRepresentation
@ -1906,7 +1906,7 @@ class KeycloakAdmin:
def delete_mapper_from_client_scope(self, client_scope_id, protocol_mppaer_id): def delete_mapper_from_client_scope(self, client_scope_id, protocol_mppaer_id):
""" """
Delete a mapper from a client scope Delete a mapper from a client scope
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_delete_mapper
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_delete_mapper
:param client_scope_id: The id of the client scope :param client_scope_id: The id of the client scope
:param payload: ProtocolMapperRepresentation :param payload: ProtocolMapperRepresentation
@ -1924,7 +1924,7 @@ class KeycloakAdmin:
def update_mapper_in_client_scope(self, client_scope_id, protocol_mapper_id, payload): def update_mapper_in_client_scope(self, client_scope_id, protocol_mapper_id, payload):
""" """
Update an existing protocol mapper in a client scope Update an existing protocol mapper in a client scope
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_protocol_mappers_resource
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_protocol_mappers_resource
:param client_scope_id: The id of the client scope :param client_scope_id: The id of the client scope
:param protocol_mapper_id: The id of the protocol mapper which exists in the client scope :param protocol_mapper_id: The id of the protocol mapper which exists in the client scope
@ -2016,7 +2016,7 @@ class KeycloakAdmin:
def add_mapper_to_client(self, client_id, payload): def add_mapper_to_client(self, client_id, payload):
""" """
Add a mapper to a client Add a mapper to a client
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_create_mapper
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_create_mapper
:param client_id: The id of the client :param client_id: The id of the client
:param payload: ProtocolMapperRepresentation :param payload: ProtocolMapperRepresentation
@ -2053,7 +2053,7 @@ class KeycloakAdmin:
def remove_client_mapper(self, client_id, client_mapper_id): def remove_client_mapper(self, client_id, client_mapper_id):
""" """
Removes a mapper from the client Removes a mapper from the client
https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_protocol_mappers_resource
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_protocol_mappers_resource
:param client_id: The id of the client :param client_id: The id of the client
:param client_mapper_id: The id of the mapper to be deleted :param client_mapper_id: The id of the mapper to be deleted
:return: Keycloak server response :return: Keycloak server response
@ -2074,7 +2074,7 @@ class KeycloakAdmin:
""" """
Generate a new secret for the client Generate a new secret for the client
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_regeneratesecret
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_regeneratesecret
:param client_id: id of client (not client-id) :param client_id: id of client (not client-id)
:return: Keycloak server response (ClientRepresentation) :return: Keycloak server response (ClientRepresentation)
@ -2088,7 +2088,7 @@ class KeycloakAdmin:
""" """
Get representation of the client secrets Get representation of the client secrets
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_getclientsecret
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getclientsecret
:param client_id: id of client (not client-id) :param client_id: id of client (not client-id)
:return: Keycloak server response (ClientRepresentation) :return: Keycloak server response (ClientRepresentation)
@ -2103,7 +2103,7 @@ class KeycloakAdmin:
Return a list of components, filtered according to query parameters Return a list of components, filtered according to query parameters
ComponentRepresentation ComponentRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_componentrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_componentrepresentation
:param query: Query parameters (optional) :param query: Query parameters (optional)
:return: components list :return: components list
@ -2118,7 +2118,7 @@ class KeycloakAdmin:
Create a new component. Create a new component.
ComponentRepresentation ComponentRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_componentrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_componentrepresentation
:param payload: ComponentRepresentation :param payload: ComponentRepresentation
@ -2137,7 +2137,7 @@ class KeycloakAdmin:
:param component_id: Component id :param component_id: Component id
ComponentRepresentation ComponentRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_componentrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_componentrepresentation
:return: ComponentRepresentation :return: ComponentRepresentation
""" """
@ -2151,7 +2151,7 @@ class KeycloakAdmin:
:param component_id: Component id :param component_id: Component id
:param payload: ComponentRepresentation :param payload: ComponentRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_componentrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_componentrepresentation
:return: Http response :return: Http response
""" """
@ -2177,7 +2177,7 @@ class KeycloakAdmin:
Return a list of keys, filtered according to query parameters Return a list of keys, filtered according to query parameters
KeysMetadataRepresentation KeysMetadataRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_key_resource
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_key_resource
:return: keys list :return: keys list
""" """
@ -2191,7 +2191,7 @@ class KeycloakAdmin:
Return a list of events, filtered according to query parameters Return a list of events, filtered according to query parameters
EventRepresentation array EventRepresentation array
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_eventrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_eventrepresentation
:return: events list :return: events list
""" """
@ -2205,7 +2205,7 @@ class KeycloakAdmin:
Set realm events configuration Set realm events configuration
RealmEventsConfigRepresentation RealmEventsConfigRepresentation
https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_realmeventsconfigrepresentation
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_realmeventsconfigrepresentation
:return: Http response :return: Http response
""" """
@ -2332,7 +2332,7 @@ class KeycloakAdmin:
:param client_id: id of client :param client_id: id of client
UserSessionRepresentation UserSessionRepresentation
http://www.keycloak.org/docs-api/3.3/rest-api/index.html#_usersessionrepresentation
http://www.keycloak.org/docs-api/17.0/rest-api/index.html#_usersessionrepresentation
:return: UserSessionRepresentation :return: UserSessionRepresentation
""" """
@ -2355,7 +2355,7 @@ class KeycloakAdmin:
""" """
Get current session count for all clients with active sessions Get current session count for all clients with active sessions
https://www.keycloak.org/docs-api/16.1/rest-api/index.html#_getclientsessionstats
https://www.keycloak.org/docs-api/17.0/rest-api/index.html#_getclientsessionstats
:return: Dict of clients and session count :return: Dict of clients and session count
""" """

Loading…
Cancel
Save