From c8c4cfbaae714f4f5b7f5a791e567c00cde40f1d Mon Sep 17 00:00:00 2001 From: mposolda Date: Tue, 8 Apr 2014 12:27:05 +0200 Subject: [PATCH] Restructure of authentication module and packages --- .../authentication-api}/pom.xml | 4 ++-- .../authentication/AuthProviderConstants.java | 2 +- .../authentication/AuthProviderStatus.java | 2 +- .../org/keycloak}/authentication/AuthUser.java | 2 +- .../authentication/AuthenticationProvider.java | 2 +- .../AuthenticationProviderException.java | 2 +- .../AuthenticationProviderManager.java | 2 +- .../authentication-model/pom.xml | 4 ++-- .../model/AbstractModelAuthenticationProvider.java | 10 +++++----- .../model/ExternalModelAuthenticationProvider.java | 8 +++----- .../model/ModelAuthenticationProvider.java | 4 ++-- ....keycloak.authentication.AuthenticationProvider | 2 ++ .../authentication-picketlink/pom.xml | 4 ++-- .../PicketlinkAuthenticationProvider.java | 14 +++++++------- .../picketlink/PartitionManagerProvider.java | 2 +- .../impl/LDAPAgentIgnoreCredentialHandler.java | 2 +- .../keycloak}/picketlink/impl/LdapConstants.java | 2 +- .../picketlink/impl/PartitionManagerRegistry.java | 3 +-- .../impl/RealmPartitionManagerProvider.java | 5 ++--- ....keycloak.authentication.AuthenticationProvider | 1 + ...rg.keycloak.picketlink.PartitionManagerProvider | 1 + {spi => authentication}/pom.xml | 6 +++--- model/tests/pom.xml | 2 +- .../keycloak/model/test/LDAPEmbeddedServer.java | 2 +- .../org/keycloak/model/test/LdapTestUtils.java | 2 +- .../model/test/AuthProvidersConfigTest.java | 2 +- .../model/test/AuthProvidersExternalModelTest.java | 7 +++---- .../keycloak/model/test/AuthProvidersLDAPTest.java | 7 +++---- .../java/org/keycloak/model/test/ImportTest.java | 2 +- pom.xml | 4 ++-- server/pom.xml | 2 +- services/pom.xml | 2 +- .../services/managers/AuthenticationManager.java | 6 +++--- .../services/resources/AccountService.java | 7 +++---- .../services/resources/RequiredActionsService.java | 4 ++-- .../keycloak/services/resources/TokenService.java | 4 ++-- .../resources/admin/ServerInfoAdminResource.java | 4 ++-- ...cloak.spi.authentication.AuthenticationProvider | 2 -- ...cloak.spi.authentication.AuthenticationProvider | 1 - ...eycloak.spi.picketlink.PartitionManagerProvider | 1 - testsuite/integration/pom.xml | 2 +- .../forms/AuthProvidersIntegrationTest.java | 2 +- 42 files changed, 71 insertions(+), 78 deletions(-) rename {spi/authentication-spi => authentication/authentication-api}/pom.xml (93%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthProviderConstants.java (92%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthProviderStatus.java (83%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthUser.java (97%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthenticationProvider.java (98%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthenticationProviderException.java (93%) rename {spi/authentication-spi/src/main/java/org/keycloak/spi => authentication/authentication-api/src/main/java/org/keycloak}/authentication/AuthenticationProviderManager.java (99%) rename {spi => authentication}/authentication-model/pom.xml (95%) rename {spi/authentication-model/src/main/java/org/keycloak/spi => authentication/authentication-model/src/main/java/org/keycloak}/authentication/model/AbstractModelAuthenticationProvider.java (91%) rename {spi/authentication-model/src/main/java/org/keycloak/spi => authentication/authentication-model/src/main/java/org/keycloak}/authentication/model/ExternalModelAuthenticationProvider.java (85%) rename {spi/authentication-model/src/main/java/org/keycloak/spi => authentication/authentication-model/src/main/java/org/keycloak}/authentication/model/ModelAuthenticationProvider.java (86%) create mode 100644 authentication/authentication-model/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider rename {spi => authentication}/authentication-picketlink/pom.xml (96%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/authentication/picketlink/PicketlinkAuthenticationProvider.java (92%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/picketlink/PartitionManagerProvider.java (87%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java (95%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/picketlink/impl/LdapConstants.java (90%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/picketlink/impl/PartitionManagerRegistry.java (97%) rename {spi/authentication-picketlink/src/main/java/org/keycloak/spi => authentication/authentication-picketlink/src/main/java/org/keycloak}/picketlink/impl/RealmPartitionManagerProvider.java (89%) create mode 100644 authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider create mode 100644 authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.picketlink.PartitionManagerProvider rename {spi => authentication}/pom.xml (83%) delete mode 100644 spi/authentication-model/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider delete mode 100644 spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider delete mode 100644 spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.picketlink.PartitionManagerProvider diff --git a/spi/authentication-spi/pom.xml b/authentication/authentication-api/pom.xml similarity index 93% rename from spi/authentication-spi/pom.xml rename to authentication/authentication-api/pom.xml index cbaee59e8f..73a15d8551 100644 --- a/spi/authentication-spi/pom.xml +++ b/authentication/authentication-api/pom.xml @@ -1,14 +1,14 @@ - keycloak-spi + keycloak-authentication org.keycloak 1.0-beta-1-SNAPSHOT ../pom.xml 4.0.0 - keycloak-authentication-spi + keycloak-authentication-api Keycloak Authentication SPI diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderConstants.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderConstants.java similarity index 92% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderConstants.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderConstants.java index d736da7a87..1da2c94b1a 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderConstants.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderConstants.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; /** * @author Marek Posolda diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderStatus.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderStatus.java similarity index 83% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderStatus.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderStatus.java index c782dfc707..9a682c14c3 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthProviderStatus.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthProviderStatus.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; /** * Result of authentication by AuthenticationProvider diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthUser.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthUser.java similarity index 97% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthUser.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthUser.java index e0e6f76ca6..8431721d83 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthUser.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthUser.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; /** * @author Marek Posolda diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProvider.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProvider.java similarity index 98% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProvider.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProvider.java index 898bc1c8e7..dab3e8b737 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProvider.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; import java.util.List; import java.util.Map; diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderException.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderException.java similarity index 93% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderException.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderException.java index 301e1f9bb1..b5ae914d4d 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderException.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderException.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; /** * @author Marek Posolda diff --git a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderManager.java b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderManager.java similarity index 99% rename from spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderManager.java rename to authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderManager.java index 823a14b79f..10564985dd 100644 --- a/spi/authentication-spi/src/main/java/org/keycloak/spi/authentication/AuthenticationProviderManager.java +++ b/authentication/authentication-api/src/main/java/org/keycloak/authentication/AuthenticationProviderManager.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication; +package org.keycloak.authentication; import java.util.Collections; import java.util.HashMap; diff --git a/spi/authentication-model/pom.xml b/authentication/authentication-model/pom.xml similarity index 95% rename from spi/authentication-model/pom.xml rename to authentication/authentication-model/pom.xml index fa521a4f74..9ab46132e9 100644 --- a/spi/authentication-model/pom.xml +++ b/authentication/authentication-model/pom.xml @@ -1,7 +1,7 @@ - keycloak-spi + keycloak-authentication org.keycloak 1.0-beta-1-SNAPSHOT ../pom.xml @@ -27,7 +27,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} provided diff --git a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/AbstractModelAuthenticationProvider.java b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/AbstractModelAuthenticationProvider.java similarity index 91% rename from spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/AbstractModelAuthenticationProvider.java rename to authentication/authentication-model/src/main/java/org/keycloak/authentication/model/AbstractModelAuthenticationProvider.java index d69c4284bd..d96bbeb22a 100644 --- a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/AbstractModelAuthenticationProvider.java +++ b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/AbstractModelAuthenticationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication.model; +package org.keycloak.authentication.model; import java.util.Map; @@ -8,10 +8,10 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.spi.authentication.AuthProviderStatus; -import org.keycloak.spi.authentication.AuthUser; -import org.keycloak.spi.authentication.AuthenticationProvider; -import org.keycloak.spi.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthProviderStatus; +import org.keycloak.authentication.AuthUser; +import org.keycloak.authentication.AuthenticationProvider; +import org.keycloak.authentication.AuthenticationProviderException; /** * Authentication provider, which delegates calling of all methods to specified realm diff --git a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ExternalModelAuthenticationProvider.java b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ExternalModelAuthenticationProvider.java similarity index 85% rename from spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ExternalModelAuthenticationProvider.java rename to authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ExternalModelAuthenticationProvider.java index a1dfa107dc..d6f74f75e2 100644 --- a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ExternalModelAuthenticationProvider.java +++ b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ExternalModelAuthenticationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication.model; +package org.keycloak.authentication.model; import java.util.Arrays; import java.util.List; @@ -7,10 +7,8 @@ import java.util.Map; import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.spi.authentication.AuthProviderConstants; -import org.keycloak.spi.authentication.AuthUser; -import org.keycloak.spi.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthenticationProviderException; /** * AbstractModelAuthenticationProvider, which delegates authentication operations to different (external) realm diff --git a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ModelAuthenticationProvider.java b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ModelAuthenticationProvider.java similarity index 86% rename from spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ModelAuthenticationProvider.java rename to authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ModelAuthenticationProvider.java index cd28aba9f2..e46514df5b 100644 --- a/spi/authentication-model/src/main/java/org/keycloak/spi/authentication/model/ModelAuthenticationProvider.java +++ b/authentication/authentication-model/src/main/java/org/keycloak/authentication/model/ModelAuthenticationProvider.java @@ -1,11 +1,11 @@ -package org.keycloak.spi.authentication.model; +package org.keycloak.authentication.model; import java.util.Collections; import java.util.List; import java.util.Map; import org.keycloak.models.RealmModel; -import org.keycloak.spi.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthProviderConstants; /** * AbstractModelAuthenticationProvider, which uses current realm to call operations on diff --git a/authentication/authentication-model/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider b/authentication/authentication-model/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider new file mode 100644 index 0000000000..beccb464a1 --- /dev/null +++ b/authentication/authentication-model/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider @@ -0,0 +1,2 @@ +org.keycloak.authentication.model.ModelAuthenticationProvider +org.keycloak.authentication.model.ExternalModelAuthenticationProvider \ No newline at end of file diff --git a/spi/authentication-picketlink/pom.xml b/authentication/authentication-picketlink/pom.xml similarity index 96% rename from spi/authentication-picketlink/pom.xml rename to authentication/authentication-picketlink/pom.xml index d0b5dcf203..4255d3d081 100644 --- a/spi/authentication-picketlink/pom.xml +++ b/authentication/authentication-picketlink/pom.xml @@ -1,7 +1,7 @@ - keycloak-spi + keycloak-authentication org.keycloak 1.0-beta-1-SNAPSHOT ../pom.xml @@ -27,7 +27,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} provided diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/authentication/picketlink/PicketlinkAuthenticationProvider.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/authentication/picketlink/PicketlinkAuthenticationProvider.java similarity index 92% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/authentication/picketlink/PicketlinkAuthenticationProvider.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/authentication/picketlink/PicketlinkAuthenticationProvider.java index 8344425159..7d4d561120 100755 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/authentication/picketlink/PicketlinkAuthenticationProvider.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/authentication/picketlink/PicketlinkAuthenticationProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.authentication.picketlink; +package org.keycloak.authentication.picketlink; import java.util.Collections; import java.util.List; @@ -7,12 +7,12 @@ import java.util.Map; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.keycloak.models.RealmModel; -import org.keycloak.spi.authentication.AuthProviderStatus; -import org.keycloak.spi.authentication.AuthProviderConstants; -import org.keycloak.spi.authentication.AuthUser; -import org.keycloak.spi.authentication.AuthenticationProvider; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.picketlink.PartitionManagerProvider; +import org.keycloak.authentication.AuthProviderStatus; +import org.keycloak.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthUser; +import org.keycloak.authentication.AuthenticationProvider; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.picketlink.PartitionManagerProvider; import org.keycloak.util.ProviderLoader; import org.picketlink.idm.IdentityManagementException; import org.picketlink.idm.IdentityManager; diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/PartitionManagerProvider.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/PartitionManagerProvider.java similarity index 87% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/PartitionManagerProvider.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/PartitionManagerProvider.java index 702162dc94..a8350195f3 100644 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/PartitionManagerProvider.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/PartitionManagerProvider.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.picketlink; +package org.keycloak.picketlink; import org.keycloak.models.RealmModel; import org.picketlink.idm.PartitionManager; diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java similarity index 95% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java index af690c0f43..f89f6e804d 100644 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LDAPAgentIgnoreCredentialHandler.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.picketlink.impl; +package org.keycloak.picketlink.impl; import org.picketlink.idm.IdentityManager; import org.picketlink.idm.ldap.internal.LDAPPlainTextPasswordCredentialHandler; diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LdapConstants.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LdapConstants.java similarity index 90% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LdapConstants.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LdapConstants.java index 86db5f9f18..7c8007180e 100644 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/LdapConstants.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/LdapConstants.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.picketlink.impl; +package org.keycloak.picketlink.impl; /** * @author Marek Posolda diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/PartitionManagerRegistry.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/PartitionManagerRegistry.java similarity index 97% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/PartitionManagerRegistry.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/PartitionManagerRegistry.java index eaa604631c..0f1c0d6585 100644 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/PartitionManagerRegistry.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/PartitionManagerRegistry.java @@ -1,4 +1,4 @@ -package org.keycloak.spi.picketlink.impl; +package org.keycloak.picketlink.impl; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -8,7 +8,6 @@ import org.keycloak.models.RealmModel; import org.picketlink.idm.PartitionManager; import org.picketlink.idm.config.IdentityConfigurationBuilder; import org.picketlink.idm.internal.DefaultPartitionManager; -import org.picketlink.idm.model.basic.Agent; import org.picketlink.idm.model.basic.User; import static org.picketlink.common.constants.LDAPConstants.CN; diff --git a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/RealmPartitionManagerProvider.java b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/RealmPartitionManagerProvider.java similarity index 89% rename from spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/RealmPartitionManagerProvider.java rename to authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/RealmPartitionManagerProvider.java index 596f1cc7b2..99431d37b2 100644 --- a/spi/authentication-picketlink/src/main/java/org/keycloak/spi/picketlink/impl/RealmPartitionManagerProvider.java +++ b/authentication/authentication-picketlink/src/main/java/org/keycloak/picketlink/impl/RealmPartitionManagerProvider.java @@ -1,10 +1,9 @@ -package org.keycloak.spi.picketlink.impl; +package org.keycloak.picketlink.impl; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.keycloak.models.RealmModel; -import org.keycloak.spi.picketlink.PartitionManagerProvider; -import org.keycloak.spi.picketlink.impl.PartitionManagerRegistry; +import org.keycloak.picketlink.PartitionManagerProvider; import org.keycloak.util.KeycloakRegistry; import org.picketlink.idm.PartitionManager; diff --git a/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider b/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider new file mode 100644 index 0000000000..f737b8a3bf --- /dev/null +++ b/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.authentication.AuthenticationProvider @@ -0,0 +1 @@ +org.keycloak.authentication.picketlink.PicketlinkAuthenticationProvider \ No newline at end of file diff --git a/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.picketlink.PartitionManagerProvider b/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.picketlink.PartitionManagerProvider new file mode 100644 index 0000000000..7a424d0325 --- /dev/null +++ b/authentication/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.picketlink.PartitionManagerProvider @@ -0,0 +1 @@ +org.keycloak.picketlink.impl.RealmPartitionManagerProvider \ No newline at end of file diff --git a/spi/pom.xml b/authentication/pom.xml similarity index 83% rename from spi/pom.xml rename to authentication/pom.xml index ea5df5747e..ac23138852 100644 --- a/spi/pom.xml +++ b/authentication/pom.xml @@ -11,12 +11,12 @@ 4.0.0 pom - keycloak-spi - Keycloak SPI + keycloak-authentication + Keycloak Authentication - authentication-spi + authentication-api authentication-model authentication-picketlink diff --git a/model/tests/pom.xml b/model/tests/pom.xml index 3ce037f17d..34de1ccd88 100755 --- a/model/tests/pom.xml +++ b/model/tests/pom.xml @@ -23,7 +23,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} compile diff --git a/model/tests/src/main/java/org/keycloak/model/test/LDAPEmbeddedServer.java b/model/tests/src/main/java/org/keycloak/model/test/LDAPEmbeddedServer.java index 14663de939..7356ef9441 100644 --- a/model/tests/src/main/java/org/keycloak/model/test/LDAPEmbeddedServer.java +++ b/model/tests/src/main/java/org/keycloak/model/test/LDAPEmbeddedServer.java @@ -17,7 +17,7 @@ import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; import org.keycloak.models.RealmModel; -import org.keycloak.spi.picketlink.impl.LdapConstants; +import org.keycloak.picketlink.impl.LdapConstants; import org.picketbox.test.ldap.AbstractLDAPTest; /** diff --git a/model/tests/src/main/java/org/keycloak/model/test/LdapTestUtils.java b/model/tests/src/main/java/org/keycloak/model/test/LdapTestUtils.java index 616c6007e7..55990fe73f 100644 --- a/model/tests/src/main/java/org/keycloak/model/test/LdapTestUtils.java +++ b/model/tests/src/main/java/org/keycloak/model/test/LdapTestUtils.java @@ -2,7 +2,7 @@ package org.keycloak.model.test; import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.keycloak.models.RealmModel; -import org.keycloak.spi.authentication.picketlink.PicketlinkAuthenticationProvider; +import org.keycloak.authentication.picketlink.PicketlinkAuthenticationProvider; import org.keycloak.util.KeycloakRegistry; import org.picketlink.idm.IdentityManager; import org.picketlink.idm.credential.Password; diff --git a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersConfigTest.java b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersConfigTest.java index 0fdcea5ee4..166b3f4499 100644 --- a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersConfigTest.java +++ b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersConfigTest.java @@ -10,7 +10,7 @@ import org.junit.Assert; import org.junit.Test; import org.keycloak.models.AuthenticationProviderModel; import org.keycloak.models.RealmModel; -import org.keycloak.spi.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthProviderConstants; /** * @author Marek Posolda diff --git a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersExternalModelTest.java b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersExternalModelTest.java index 05374a5765..06173686cb 100755 --- a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersExternalModelTest.java +++ b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersExternalModelTest.java @@ -5,7 +5,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Set; import javax.ws.rs.core.MultivaluedHashMap; import javax.ws.rs.core.MultivaluedMap; @@ -25,9 +24,9 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.AuthenticationManager; -import org.keycloak.spi.authentication.AuthProviderConstants; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthenticationProviderManager; /** * @author Marek Posolda diff --git a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersLDAPTest.java b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersLDAPTest.java index 91f99dde7a..4d63a67d45 100755 --- a/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersLDAPTest.java +++ b/model/tests/src/test/java/org/keycloak/model/test/AuthProvidersLDAPTest.java @@ -2,7 +2,6 @@ package org.keycloak.model.test; import java.util.Arrays; import java.util.Collections; -import java.util.Set; import javax.ws.rs.core.MultivaluedMap; @@ -20,9 +19,9 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.AuthenticationManager; -import org.keycloak.spi.authentication.AuthProviderConstants; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthenticationProviderManager; import org.keycloak.util.KeycloakRegistry; /** diff --git a/model/tests/src/test/java/org/keycloak/model/test/ImportTest.java b/model/tests/src/test/java/org/keycloak/model/test/ImportTest.java index fb8ebaabf9..db004b5aec 100755 --- a/model/tests/src/test/java/org/keycloak/model/test/ImportTest.java +++ b/model/tests/src/test/java/org/keycloak/model/test/ImportTest.java @@ -17,7 +17,7 @@ import org.keycloak.models.SocialLinkModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.services.managers.RealmManager; -import org.keycloak.spi.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthProviderConstants; import java.util.List; import java.util.Map; diff --git a/pom.xml b/pom.xml index 9d07a30c78..47110d19a6 100755 --- a/pom.xml +++ b/pom.xml @@ -86,6 +86,7 @@ audit + authentication core core-jaxrs model @@ -97,8 +98,7 @@ examples testsuite server - spi - timer + timer diff --git a/server/pom.xml b/server/pom.xml index 95c265c71b..972802a0c6 100755 --- a/server/pom.xml +++ b/server/pom.xml @@ -129,7 +129,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} diff --git a/services/pom.xml b/services/pom.xml index 40be81edce..9615528e79 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -83,7 +83,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} provided diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java index 2d942d9b56..04b954b8de 100755 --- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java @@ -16,9 +16,9 @@ import org.keycloak.representations.AccessToken; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.ClientConnection; import org.keycloak.services.resources.RealmsResource; -import org.keycloak.spi.authentication.AuthProviderStatus; -import org.keycloak.spi.authentication.AuthUser; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthProviderStatus; +import org.keycloak.authentication.AuthUser; +import org.keycloak.authentication.AuthenticationProviderManager; import org.keycloak.util.Time; import javax.ws.rs.core.Cookie; diff --git a/services/src/main/java/org/keycloak/services/resources/AccountService.java b/services/src/main/java/org/keycloak/services/resources/AccountService.java index bdc97fea8a..022db5cd6e 100755 --- a/services/src/main/java/org/keycloak/services/resources/AccountService.java +++ b/services/src/main/java/org/keycloak/services/resources/AccountService.java @@ -58,9 +58,9 @@ import org.keycloak.services.validation.Validation; import org.keycloak.social.SocialLoader; import org.keycloak.social.SocialProvider; import org.keycloak.social.SocialProviderException; -import org.keycloak.spi.authentication.AuthProviderStatus; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthProviderStatus; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthenticationProviderManager; import javax.ws.rs.BadRequestException; import javax.ws.rs.Consumes; @@ -80,7 +80,6 @@ import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; import javax.ws.rs.core.Variant; import java.net.URI; -import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; diff --git a/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java b/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java index d77ba7e6ee..5ef6cfb90f 100755 --- a/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java +++ b/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java @@ -46,8 +46,8 @@ import org.keycloak.services.managers.TokenManager; import org.keycloak.services.messages.Messages; import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.validation.Validation; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthenticationProviderManager; import org.keycloak.util.Time; import javax.ws.rs.Consumes; diff --git a/services/src/main/java/org/keycloak/services/resources/TokenService.java b/services/src/main/java/org/keycloak/services/resources/TokenService.java index a18e141068..5e2334a372 100755 --- a/services/src/main/java/org/keycloak/services/resources/TokenService.java +++ b/services/src/main/java/org/keycloak/services/resources/TokenService.java @@ -34,8 +34,8 @@ import org.keycloak.services.messages.Messages; import org.keycloak.services.resources.flows.Flows; import org.keycloak.services.resources.flows.OAuthFlows; import org.keycloak.services.validation.Validation; -import org.keycloak.spi.authentication.AuthenticationProviderException; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthenticationProviderException; +import org.keycloak.authentication.AuthenticationProviderManager; import org.keycloak.util.BasicAuthHelper; import org.keycloak.util.Time; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java index d0ffbfad69..1004873b80 100644 --- a/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/ServerInfoAdminResource.java @@ -5,8 +5,8 @@ import org.keycloak.freemarker.Theme; import org.keycloak.freemarker.ThemeProvider; import org.keycloak.services.ProviderSession; import org.keycloak.social.SocialProvider; -import org.keycloak.spi.authentication.AuthenticationProvider; -import org.keycloak.spi.authentication.AuthenticationProviderManager; +import org.keycloak.authentication.AuthenticationProvider; +import org.keycloak.authentication.AuthenticationProviderManager; import org.keycloak.util.ProviderLoader; import javax.ws.rs.GET; diff --git a/spi/authentication-model/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider b/spi/authentication-model/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider deleted file mode 100644 index e7137796bf..0000000000 --- a/spi/authentication-model/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider +++ /dev/null @@ -1,2 +0,0 @@ -org.keycloak.spi.authentication.model.ModelAuthenticationProvider -org.keycloak.spi.authentication.model.ExternalModelAuthenticationProvider \ No newline at end of file diff --git a/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider b/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider deleted file mode 100644 index 8d9e9de7d2..0000000000 --- a/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.authentication.AuthenticationProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.spi.authentication.picketlink.PicketlinkAuthenticationProvider \ No newline at end of file diff --git a/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.picketlink.PartitionManagerProvider b/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.picketlink.PartitionManagerProvider deleted file mode 100644 index cc2d98435f..0000000000 --- a/spi/authentication-picketlink/src/main/resources/META-INF/services/org.keycloak.spi.picketlink.PartitionManagerProvider +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.spi.picketlink.impl.RealmPartitionManagerProvider \ No newline at end of file diff --git a/testsuite/integration/pom.xml b/testsuite/integration/pom.xml index b5fd3c8835..4221a3c202 100755 --- a/testsuite/integration/pom.xml +++ b/testsuite/integration/pom.xml @@ -162,7 +162,7 @@ org.keycloak - keycloak-authentication-spi + keycloak-authentication-api ${project.version} diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/AuthProvidersIntegrationTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/AuthProvidersIntegrationTest.java index 7bf2e3ae66..d9ee2d97a9 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/AuthProvidersIntegrationTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/AuthProvidersIntegrationTest.java @@ -17,7 +17,7 @@ import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.RealmManager; -import org.keycloak.spi.authentication.AuthProviderConstants; +import org.keycloak.authentication.AuthProviderConstants; import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.pages.AccountPasswordPage; import org.keycloak.testsuite.pages.AccountUpdateProfilePage;