remove User Fed SPI
This commit is contained in:
1 parent
fad33bc50f
commit
ccbd8e8c70
85 files changed
+505
-2891
No files matched your search
@@ -596,7 +596,7 @@ public class LDAPStorageProvider implements UserStorageProvider,
|
||||
logger.warnf("User with username [%s] aready exists and is linked to provider [%s] but is not valid. Stale LDAP_ID on local user is: %s",
|
||||
username, model.getName(), user.getFirstAttribute(LDAPConstants.LDAP_ID));
|
||||
logger.warn("Will re-create user");
|
||||
session.getUserCache().evict(realm, user);
|
||||
session.userCache().evict(realm, user);
|
||||
new UserManager(session).removeUser(realm, user, session.userLocalStorage());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -495,7 +495,7 @@ public class LDAPStorageProviderFactory implements UserStorageProviderFactory<LD
|
||||
if (username != null) {
|
||||
UserModel existing = session.userLocalStorage().getUserByUsername(username, currentRealm);
|
||||
if (existing != null) {
|
||||
session.getUserCache().evict(currentRealm, existing);
|
||||
session.userCache().evict(currentRealm, existing);
|
||||
session.userLocalStorage().removeUser(currentRealm, existing);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ package org.keycloak.storage.ldap;
|
||||
|
||||
import org.keycloak.component.ComponentModel;
|
||||
import org.keycloak.component.ComponentValidationException;
|
||||
import org.keycloak.mappers.FederationConfigValidationException;
|
||||
import org.keycloak.models.LDAPConstants;
|
||||
import org.keycloak.models.ModelException;
|
||||
import org.keycloak.models.RealmModel;
|
||||
@@ -268,7 +267,7 @@ public class LDAPUtils {
|
||||
* Validate configured customFilter matches the requested format
|
||||
*
|
||||
* @param customFilter
|
||||
* @throws FederationConfigValidationException
|
||||
* @throws ComponentValidationException
|
||||
*/
|
||||
public static void validateCustomLdapFilter(String customFilter) throws ComponentValidationException {
|
||||
if (customFilter != null) {
|
||||
|
||||
Reference in new issue
Block a user