public class LDAPStorageProvider extends Object implements UserStorageProvider, CredentialInputValidator, CredentialInputUpdater, CredentialAuthentication, UserLookupProvider, UserRegistrationProvider, UserQueryProvider, ImportedUserValidation
UserStorageProvider.EditMode| Modifier and Type | Field and Description |
|---|---|
protected UserStorageProvider.EditMode |
editMode |
protected LDAPStorageProviderFactory |
factory |
protected LDAPProviderKerberosConfig |
kerberosConfig |
protected LDAPIdentityStore |
ldapIdentityStore |
protected LDAPStorageMapperManager |
mapperManager |
protected UserStorageProviderModel |
model |
protected KeycloakSession |
session |
protected Set<String> |
supportedCredentialTypes |
protected PasswordUpdateCallback |
updater |
protected LDAPStorageUserManager |
userManager |
| Constructor and Description |
|---|
LDAPStorageProvider(LDAPStorageProviderFactory factory,
KeycloakSession session,
ComponentModel model,
LDAPIdentityStore ldapIdentityStore) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountUsersInGroups, getRoleMembers, getRoleMembers, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCount, getUsersCountprotected LDAPStorageProviderFactory factory
protected KeycloakSession session
protected UserStorageProviderModel model
protected LDAPIdentityStore ldapIdentityStore
protected UserStorageProvider.EditMode editMode
protected LDAPProviderKerberosConfig kerberosConfig
protected PasswordUpdateCallback updater
protected LDAPStorageMapperManager mapperManager
protected LDAPStorageUserManager userManager
public LDAPStorageProvider(LDAPStorageProviderFactory factory, KeycloakSession session, ComponentModel model, LDAPIdentityStore ldapIdentityStore)
public void setUpdater(PasswordUpdateCallback updater)
public KeycloakSession getSession()
public LDAPIdentityStore getLdapIdentityStore()
public UserStorageProvider.EditMode getEditMode()
public UserStorageProviderModel getModel()
public LDAPStorageMapperManager getMapperManager()
public LDAPStorageUserManager getUserManager()
public UserModel validate(RealmModel realm, UserModel local)
validate in interface ImportedUserValidationprotected UserModel proxy(RealmModel realm, UserModel local, LDAPObject ldapObject)
public boolean supportsCredentialAuthenticationFor(String type)
supportsCredentialAuthenticationFor in interface CredentialAuthenticationpublic List<UserModel> searchForUserByUserAttribute(String attrName, String attrValue, RealmModel realm)
searchForUserByUserAttribute in interface UserQueryProviderpublic boolean synchronizeRegistrations()
public UserModel addUser(RealmModel realm, String username)
addUser in interface UserRegistrationProviderpublic boolean removeUser(RealmModel realm, UserModel user)
removeUser in interface UserRegistrationProviderpublic UserModel getUserById(String id, RealmModel realm)
getUserById in interface UserLookupProviderpublic int getUsersCount(RealmModel realm)
getUsersCount in interface UserQueryProviderpublic List<UserModel> getUsers(RealmModel realm)
getUsers in interface UserQueryProviderpublic List<UserModel> getUsers(RealmModel realm, int firstResult, int maxResults)
getUsers in interface UserQueryProviderpublic List<UserModel> searchForUser(String search, RealmModel realm)
searchForUser in interface UserQueryProviderpublic List<UserModel> searchForUser(String search, RealmModel realm, int firstResult, int maxResults)
searchForUser in interface UserQueryProviderpublic List<UserModel> searchForUser(Map<String,String> params, RealmModel realm)
searchForUser in interface UserQueryProviderpublic List<UserModel> searchForUser(Map<String,String> params, RealmModel realm, int firstResult, int maxResults)
searchForUser in interface UserQueryProviderpublic List<UserModel> getGroupMembers(RealmModel realm, GroupModel group)
getGroupMembers in interface UserQueryProviderpublic List<UserModel> getGroupMembers(RealmModel realm, GroupModel group, int firstResult, int maxResults)
getGroupMembers in interface UserQueryProviderpublic List<UserModel> loadUsersByUsernames(List<String> usernames, RealmModel realm)
protected List<LDAPObject> searchLDAP(RealmModel realm, Map<String,String> attributes, int maxResults)
protected LDAPObject loadAndValidateUser(RealmModel realm, UserModel local)
local - public UserModel getUserByUsername(String username, RealmModel realm)
getUserByUsername in interface UserLookupProviderprotected UserModel importUserFromLDAP(KeycloakSession session, RealmModel realm, LDAPObject ldapUser)
protected LDAPObject queryByEmail(RealmModel realm, String email)
public UserModel getUserByEmail(String email, RealmModel realm)
getUserByEmail in interface UserLookupProviderpublic void preRemove(RealmModel realm)
preRemove in interface UserStorageProviderpublic void preRemove(RealmModel realm, RoleModel role)
preRemove in interface UserStorageProviderpublic void preRemove(RealmModel realm, GroupModel group)
preRemove in interface UserStorageProviderpublic boolean validPassword(RealmModel realm, UserModel user, String password)
public boolean updateCredential(RealmModel realm, UserModel user, CredentialInput input)
updateCredential in interface CredentialInputUpdaterpublic void disableCredentialType(RealmModel realm, UserModel user, String credentialType)
disableCredentialType in interface CredentialInputUpdaterpublic Set<String> getDisableableCredentialTypes(RealmModel realm, UserModel user)
getDisableableCredentialTypes in interface CredentialInputUpdaterpublic boolean supportsCredentialType(String credentialType)
supportsCredentialType in interface CredentialInputUpdatersupportsCredentialType in interface CredentialInputValidatorpublic boolean isConfiguredFor(RealmModel realm, UserModel user, String credentialType)
isConfiguredFor in interface CredentialInputValidatorpublic boolean isValid(RealmModel realm, UserModel user, CredentialInput input)
isValid in interface CredentialInputValidatorpublic CredentialValidationOutput authenticate(RealmModel realm, CredentialInput cred)
authenticate in interface CredentialAuthenticationprotected UserModel findOrCreateAuthenticatedUser(RealmModel realm, String username)
realm - realmusername - username without realm prefixpublic LDAPObject loadLDAPUserByUsername(RealmModel realm, String username)
Copyright © 2020 JBoss by Red Hat. All rights reserved.