KeycloakClient

interface KeycloakClient

Interface access resources on keycloak. Build with initKeycloakClient

Functions

Link copied to clipboard
abstract fun addChildGroup(addGroup: AddGroup, parentGroupId: UUID, realm: String): Response
Link copied to clipboard
abstract fun addClient(addClient: AddClient, realm: String): Response
Link copied to clipboard
abstract fun addClientMapper(clientId: UUID, addMapper: AddMapper, realm: String): Response
Link copied to clipboard
abstract fun addClientRole(addRole: AddRole, clientId: UUID, realm: String)
Link copied to clipboard
abstract fun addClientRoleScopeMappingToClient(roleScopeMapping: List<RoleListItem>, realm: String, id: UUID, roleClientId: UUID): Response
Link copied to clipboard
abstract fun addClientScope(realm: String, addClientScope: AddClientScope): Response
Link copied to clipboard
abstract fun addClientScopeMapper(clientScopeId: UUID, addMapper: AddMapper, realm: String): Response
Link copied to clipboard
abstract fun addCompositeToRole(roles: List<RoleListItem>, roleId: UUID, realm: String): Response
Link copied to clipboard
abstract fun addFlow(realm: String, addFlow: AddFlow): Response
Link copied to clipboard
abstract fun addFlowExecution(realm: String, alias: String, addFlowExecution: AddFlowExecution): Response
Link copied to clipboard
abstract fun addGroup(addGroup: AddGroup, realm: String): Response
Link copied to clipboard
abstract fun addIdentityProvider(addIdentityProvider: AddIdentityProvider, realm: String): Response
Link copied to clipboard
abstract fun addIdentityProviderMapper(addIdentityProviderMapper: AddIdentityProviderMapper, realm: String, alias: String): Response
Link copied to clipboard
abstract fun addMapper(clientId: UUID, addMapper: AddMapper, realm: String): Response
Link copied to clipboard
abstract fun addRealm(addRealm: AddRealm)
Link copied to clipboard
abstract fun addRealmRoleScopeMappingToClient(roleScopeMapping: List<RoleListItem>, realm: String, id: UUID): Response
Link copied to clipboard
abstract fun addRole(addRole: AddRole, realm: String)
Link copied to clipboard
abstract fun addSimpleClient(addSimpleClient: AddSimpleClient, realm: String): Response
Link copied to clipboard
abstract fun addUser(user: AddUser, realm: String): Response
Link copied to clipboard
abstract fun addUserFederation(addUserFederation: AddUserFederation, realm: String)
Link copied to clipboard
abstract fun addUserFederationMapper(addUserFederationMapper: AddUserFederationMapper, realm: String): Response
Link copied to clipboard
abstract fun assignClientRoles(roles: List<AssignRole>, realm: String, userId: UUID, clientId: UUID)
Link copied to clipboard
abstract fun assignClientRolesToGroup(roles: List<AssignRole>, realm: String, groupId: UUID, clientId: UUID)
Link copied to clipboard
abstract fun assignClientRoleToClientScope(roles: List<AssignRole>, realm: String, clientScopeId: UUID, clientId: UUID): Response
Link copied to clipboard
abstract fun assignDefaultClientScope(realm: String, clientId: UUID, clientScopeId: UUID, assignClientScope: AssignClientScope): Response
Link copied to clipboard
abstract fun assignGroup(assignGroup: AssignGroup, realm: String, userId: UUID, groupId: UUID)
Link copied to clipboard
abstract fun assignOptionalClientScope(realm: String, clientId: UUID, clientScopeId: UUID, assignClientScope: AssignClientScope): Response
Link copied to clipboard
abstract fun assignRealmRoles(roles: List<AssignRole>, realm: String, userId: UUID)
Link copied to clipboard
abstract fun assignRealmRolesToGroup(roles: List<AssignRole>, realm: String, groupId: UUID)
Link copied to clipboard
abstract fun assignRealmRoleToClientScope(roles: List<AssignRole>, realm: String, clientScopeId: UUID)
Link copied to clipboard
abstract fun client(clientId: UUID, realm: String): Client
Link copied to clipboard
fun KeycloakClient.clientById(clientId: String, realm: String): Client
Link copied to clipboard
fun KeycloakClient.clientMapperExistsByName(clientId: String, mapperName: String, realm: String): Boolean
Link copied to clipboard
abstract fun clientMappers(clientId: UUID, realm: String): List<Mapper>
Link copied to clipboard
abstract fun clientRole(roleId: UUID, realm: String, clientId: UUID): Role
Link copied to clipboard
fun KeycloakClient.clientRoleByName(name: String, clientId: String, realm: String): Role
Link copied to clipboard
abstract fun clientRoles(realm: String, clientId: UUID): List<RoleListItem>
Link copied to clipboard
abstract fun clientRoleScopeMappingsOfClient(realm: String, id: UUID, roleClientId: UUID): List<RoleListItem>
Link copied to clipboard
abstract fun clients(realm: String): List<ClientListItem>
Link copied to clipboard
Link copied to clipboard
abstract fun clientScopeClientRoles(realm: String, clientScopeId: UUID, clientId: UUID): List<RoleListItem>
Link copied to clipboard
fun KeycloakClient.clientScopeMapperExistsByName(clientScopeName: String, mapperName: String, realm: String): Boolean
Link copied to clipboard
abstract fun clientScopeMappers(clientScopeId: UUID, realm: String): List<Mapper>
Link copied to clipboard
abstract fun clientScopeRealmRoles(realm: String, clientScopeId: UUID): List<RoleListItem>
Link copied to clipboard
abstract fun clientScopes(realm: String): List<ClientScope>
Link copied to clipboard
fun KeycloakClient.clientScopeUUID(clientScopeName: String, realm: String): UUID
Link copied to clipboard
abstract fun clientSecret(clientId: UUID, realm: String): ClientSecret
Link copied to clipboard
abstract fun clientServiceAccount(clientId: UUID, realm: String): User
Link copied to clipboard
fun KeycloakClient.clientUUID(clientId: String, realm: String): UUID
Link copied to clipboard
abstract fun defaultClientScopes(realm: String, clientId: UUID): List<ClientScopeItem>
Link copied to clipboard
abstract fun deleteClient(clientId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteClientMapper(clientId: UUID, mapperId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteClientRoleScopeMappingOfClient(roleScopeMapping: List<RoleListItem>, realm: String, id: UUID, roleClientId: UUID): Response
Link copied to clipboard
abstract fun deleteClientScope(realm: String, clientScopeId: UUID): Response
Link copied to clipboard
abstract fun deleteClientScopeMapper(clientScopeId: UUID, mapperId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteFlow(realm: String, flowId: UUID)
Link copied to clipboard
abstract fun deleteFlowExecution(realm: String, executionId: UUID)
Link copied to clipboard
abstract fun deleteGroup(groupUUID: UUID, realm: String): Response
Link copied to clipboard
abstract fun deleteIdentityProvider(realm: String, alias: String)
Link copied to clipboard
abstract fun deleteIdentityProviderMapper(realm: String, alias: String, id: String)
Link copied to clipboard
abstract fun deleteMapper(clientId: UUID, mapperId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteRealm(id: String)
Link copied to clipboard
abstract fun deleteRealmRoleScopeMappingOfClient(roleScopeMapping: List<RoleListItem>, realm: String, id: UUID): Response
Link copied to clipboard
abstract fun deleteRequiredAction(realm: String, alias: String): Response
Link copied to clipboard
abstract fun deleteRole(roleId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteUser(userId: UUID, realm: String)
Link copied to clipboard
abstract fun deleteUserFederation(realm: String, userFederationId: String)
Link copied to clipboard
abstract fun deleteUserFederationMapper(realm: String, mapperId: UUID): Response
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun flows(realm: String): List<Flow>
Link copied to clipboard
abstract fun getAuthenticatorConfiguration(realm: String, configurationId: String): AuthenticatorConfig
Link copied to clipboard
abstract fun getCompositeChildRoles(roleId: UUID, realm: String): List<RoleListItem>
Link copied to clipboard
abstract fun group(realm: String, groupId: UUID): Group
Link copied to clipboard
Link copied to clipboard
abstract fun groupClientRoles(realm: String, id: UUID, clientId: UUID): List<RoleListItem>
Link copied to clipboard
abstract fun groupRoles(realm: String, id: UUID): List<RoleListItem>
Link copied to clipboard
Link copied to clipboard
abstract fun identityProvider(realm: String, alias: String): IdentityProvider
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun KeycloakClient.identityProviderMapperExistsByName(identityProviderAlias: String, name: String, realm: String): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun importClient(importClientRepresentation: ImportClientRepresentation, realm: String): Response
Link copied to clipboard
fun KeycloakClient.importFlow(realm: String, importFlow: ImportFlow): UUID
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun ldapMappers(realm: String, ldapId: String): List<UserFederationMapper>
Link copied to clipboard
abstract fun mappers(clientId: UUID, realm: String): List<Mapper>
Link copied to clipboard
abstract fun optionalClientScopes(realm: String, clientId: UUID): List<ClientScopeItem>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun realmNames(): List<RealmName>
Link copied to clipboard
Link copied to clipboard
abstract fun realms(): List<Realm>
Link copied to clipboard
abstract fun realmUserProfile(realm: String): RealmProfile
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun revokeClientRoleFromClientScope(roles: List<AssignRole>, realm: String, clientScopeId: UUID, clientId: UUID): Response
Link copied to clipboard
abstract fun revokeClientRoles(roles: List<AssignRole>, realm: String, userId: UUID, clientId: UUID)
Link copied to clipboard
abstract fun revokeClientRolesFromGroup(roles: List<AssignRole>, realm: String, groupId: UUID, clientId: UUID)
Link copied to clipboard
abstract fun revokeGroup(realm: String, userId: UUID, groupId: UUID)
Link copied to clipboard
abstract fun revokeRealmRoleFromClientScope(roles: List<AssignRole>, realm: String, clientScopeId: UUID): Response
Link copied to clipboard
abstract fun revokeRealmRoles(roles: List<AssignRole>, realm: String, userId: UUID)
Link copied to clipboard
abstract fun revokeRealmRolesFromGroup(roles: List<AssignRole>, realm: String, groupId: UUID)
Link copied to clipboard
abstract fun role(roleId: UUID, realm: String): Role
Link copied to clipboard
abstract fun roleByName(name: String, realm: String): Role
Link copied to clipboard
abstract fun roleByNameResponse(name: String, realm: String): Response
Link copied to clipboard
Link copied to clipboard
abstract fun roles(realm: String): List<RoleListItem>
Link copied to clipboard
abstract fun searchByUsername(username: String, realm: String, exact: Boolean = false, from: Int = 0, max: Int = 100): List<User>
Link copied to clipboard
abstract fun searchGroup(search: String, realm: String): List<GroupListItem>
Link copied to clipboard
abstract fun searchUser(search: String, realm: String, max: Int = 100): List<User>
Link copied to clipboard
abstract fun searchUserByQuery(query: String, realm: String, from: Int = 0, max: Int = 100): List<User>
Link copied to clipboard
abstract fun sendEmail(actions: List<EmailActions>, realm: String, userId: UUID, lifespan: Int = 43200)

Sends an email with the specified actions to the user if smtp is configured for this realm

Link copied to clipboard
abstract fun tryUser(userId: UUID, realm: String): Response
Link copied to clipboard
abstract fun updateClient(clientId: UUID, updateClient: Client, realm: String): Response
Link copied to clipboard
abstract fun updateFlow(realm: String, flowId: UUID, updateFlow: UpdateFlow)
Link copied to clipboard
abstract fun updateFlowExecution(realm: String, alias: String, updateFlowExecution: UpdateFlowExecution): Response
Link copied to clipboard
abstract fun updateFlowExecutionWithNewConfiguration(realm: String, executionId: String, authenticatorConfig: AuthenticatorConfig): Response
Link copied to clipboard
Link copied to clipboard
abstract fun updateGroup(updateGroup: UpdateGroup, realm: String, groupId: UUID): Response
Link copied to clipboard
abstract fun updateIdentityProvider(updateIdentityProvider: UpdateIdentityProvider, realm: String, alias: String): Response
Link copied to clipboard
abstract fun updateRealm(realmId: String, realm: Realm)
Link copied to clipboard
abstract fun updateRequiredAction(realm: String, alias: String, requiredActionProviderItem: RequiredActionProviderItem): Response
Link copied to clipboard
abstract fun updateRole(role: Role, roleId: UUID, realm: String)
Link copied to clipboard
abstract fun updateUser(userId: UUID, user: User, realm: String)
Link copied to clipboard
abstract fun updateUserPassword(userId: UUID, resetPassword: ResetPassword, realm: String)
Link copied to clipboard
abstract fun user(userId: UUID, realm: String): User
Link copied to clipboard

File contains a lot of convenience functions when interacting with the keycloak client

Link copied to clipboard
abstract fun userClientRoles(realm: String, userId: UUID, clientId: UUID): List<RoleListItem>
Link copied to clipboard
Link copied to clipboard
abstract fun userFederations(realm: String): List<UserFederation>
Link copied to clipboard
abstract fun userGroups(realm: String, id: UUID): List<UserGroupListItem>
Link copied to clipboard
abstract fun userRoles(realm: String, id: UUID): List<RoleListItem>
Link copied to clipboard
abstract fun users(realm: String, max: Int = 100): List<User>
Link copied to clipboard
Link copied to clipboard
abstract fun withdrawDefaultClientScope(realm: String, clientId: UUID, clientScopeId: UUID): Response
Link copied to clipboard
abstract fun withdrawOptionalClientScope(realm: String, clientId: UUID, clientScopeId: UUID): Response