Renaming ScimStorageProviderFactory

This commit is contained in:
Alex Morel 2024-06-21 09:45:57 +02:00
parent 2e992dad44
commit bee8d1f39b
4 changed files with 14 additions and 14 deletions

View file

@ -3,7 +3,7 @@ package sh.libre.scim.core;
import org.jboss.logging.Logger;
import org.keycloak.component.ComponentModel;
import org.keycloak.models.KeycloakSession;
import sh.libre.scim.storage.ScimStorageProviderFactory;
import sh.libre.scim.storage.ScimEndpointConfigurationStorageProviderFactory;
import java.util.ArrayList;
import java.util.LinkedHashMap;
@ -53,7 +53,7 @@ public class ScimDispatcher {
// Step 2: Get All SCIM endpoints defined in Admin Console (enabled ScimStorageProviderFactory)
session.getContext().getRealm().getComponentsStream()
.filter(m -> ScimStorageProviderFactory.ID.equals(m.getProviderId())
.filter(m -> ScimEndpointConfigurationStorageProviderFactory.ID.equals(m.getProviderId())
&& m.get("enabled", true))
.forEach(scimEndpointConfigurationRaw -> {
ScrimProviderConfiguration scrimProviderConfiguration = new ScrimProviderConfiguration(scimEndpointConfigurationRaw);
@ -115,7 +115,7 @@ public class ScimDispatcher {
}
}
public void close() throws Exception {
public void close() {
sessionToScimDispatcher.remove(session);
for (GroupScimService c : groupScimServices) {
c.close();

View file

@ -21,8 +21,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* An {@link java.util.EventListener} in charge of reaction to Keycloak models
* modification (e.g. User creation, Group deletion, membership modifications...)
* An Event listener reacting to Keycloak models modification
* (e.g. User creation, Group deletion, membership modifications, endpoint configuration change...)
* by propagating it to all registered Scim endpoints.
*/
public class ScimEventListenerProvider implements EventListenerProvider {

View file

@ -26,12 +26,12 @@ import java.util.Date;
import java.util.List;
/**
* Allows to register Scim endpoints through Admin console, using the provided config properties.
* Allows to register and configure Scim endpoints through Admin console, using the provided config properties.
*/
public class ScimStorageProviderFactory
implements UserStorageProviderFactory<ScimStorageProviderFactory.ScimStorageProvider>, ImportSynchronization {
public class ScimEndpointConfigurationStorageProviderFactory
implements UserStorageProviderFactory<ScimEndpointConfigurationStorageProviderFactory.ScimEndpointConfigurationStorageProvider>, ImportSynchronization {
public static final String ID = "scim";
private final Logger logger = Logger.getLogger(ScimStorageProviderFactory.class);
private final Logger logger = Logger.getLogger(ScimEndpointConfigurationStorageProviderFactory.class);
@Override
public String getId() {
@ -164,14 +164,14 @@ public class ScimStorageProviderFactory
@Override
public ScimStorageProvider create(KeycloakSession session, ComponentModel model) {
return new ScimStorageProvider();
public ScimEndpointConfigurationStorageProvider create(KeycloakSession session, ComponentModel model) {
return new ScimEndpointConfigurationStorageProvider();
}
/**
* Empty implementation : we used this {@link ScimStorageProviderFactory} to generate Admin Console page.
* Empty implementation : we used this {@link ScimEndpointConfigurationStorageProviderFactory} to generate Admin Console page.
*/
public static final class ScimStorageProvider implements UserStorageProvider {
public static final class ScimEndpointConfigurationStorageProvider implements UserStorageProvider {
@Override
public void close() {
// Nothing to close here

View file

@ -1 +1 @@
sh.libre.scim.storage.ScimStorageProviderFactory
sh.libre.scim.storage.ScimEndpointConfigurationStorageProviderFactory