diff --git a/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java b/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java index 92bd48e992..e061f5eeb3 100755 --- a/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java +++ b/federation/kerberos/src/main/java/org/keycloak/federation/kerberos/KerberosFederationProviderFactory.java @@ -151,7 +151,7 @@ public class KerberosFederationProviderFactory implements UserStorageProviderFac } @Override - public void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel model) { + public void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel) { CredentialHelper.setOrReplaceAuthenticationRequirement(session, realm, CredentialRepresentation.KERBEROS, AuthenticationExecutionModel.Requirement.ALTERNATIVE, AuthenticationExecutionModel.Requirement.DISABLED); } diff --git a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPStorageProviderFactory.java b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPStorageProviderFactory.java index 6d60ee7f87..81991570c0 100755 --- a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPStorageProviderFactory.java +++ b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPStorageProviderFactory.java @@ -375,8 +375,8 @@ public class LDAPStorageProviderFactory implements UserStorageProviderFactory ex return null; } + /** + * Called before a component is created or updated. Allows you to validate the configuration + * + * @param session + * @param realm + * @param model + * @throws ComponentValidationException + */ default void validateConfiguration(KeycloakSession session, RealmModel realm, ComponentModel model) throws ComponentValidationException { } + /** + * Called after a component is created + * + * @param session + * @param realm + * @param model + */ default void onCreate(KeycloakSession session, RealmModel realm, ComponentModel model) { } + /** + * Called after the component is updated. + * + * @param session + * @param realm + * @param oldModel old saved model + * @param newModel new configuration + */ default - void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel model) { + void onUpdate(KeycloakSession session, RealmModel realm, ComponentModel oldModel, ComponentModel newModel) { }