From b403c9b9344861a4bee5a5af4d96ecf05ec2863c Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sat, 16 Jan 2016 09:15:17 -0500 Subject: [PATCH] broker and social --- broker/core/pom.xml | 46 --------- .../services/org.keycloak.provider.Spi | 2 - broker/oidc/pom.xml | 2 +- .../oidc/mappers/ClaimToRoleMapper.java | 8 +- .../ExternalKeycloakRoleToRoleMapper.java | 6 +- broker/pom.xml | 1 - broker/saml/pom.xml | 3 +- .../saml/mappers/AttributeToRoleMapper.java | 8 +- dependencies/server-min/pom.xml | 6 -- .../main/module.xml | 1 - .../keycloak-broker-core/main/module.xml | 18 ---- .../keycloak-broker-oidc/main/module.xml | 1 - .../keycloak-broker-saml/main/module.xml | 1 - .../keycloak-email-freemarker/main/module.xml | 2 - .../keycloak-login-freemarker/main/module.xml | 2 - .../WEB-INF/jboss-deployment-structure.xml | 1 - .../keycloak-services/main/module.xml | 2 - .../keycloak-social-core/main/module.xml | 22 ----- .../keycloak-social-facebook/main/module.xml | 2 - .../keycloak-social-github/main/module.xml | 2 - .../keycloak-social-google/main/module.xml | 2 - .../keycloak-social-linkedin/main/module.xml | 2 - .../main/module.xml | 2 - .../keycloak-social-twitter/main/module.xml | 2 - forms/account-freemarker/pom.xml | 5 - forms/login-freemarker/pom.xml | 5 - pom.xml | 10 -- .../provider/AbstractIdentityProvider.java | 0 .../AbstractIdentityProviderFactory.java | 0 .../AbstractIdentityProviderMapper.java | 0 .../provider/AuthenticationRequest.java | 0 .../provider/BrokeredIdentityContext.java | 0 .../broker/provider/ConfigConstants.java | 9 ++ .../provider/DefaultDataMarshaller.java | 0 .../provider/IdentityBrokerException.java | 0 .../broker/provider/IdentityProvider.java | 0 .../IdentityProviderDataMarshaller.java | 0 .../provider/IdentityProviderFactory.java | 0 .../provider/IdentityProviderMapper.java | 0 .../provider/IdentityProviderMapperSpi.java | 0 .../broker/provider/IdentityProviderSpi.java | 0 .../broker/provider/util/SimpleHttp.java | 0 .../social/SocialIdentityProvider.java | 2 +- .../social/SocialIdentityProviderFactory.java | 2 +- .../broker}/social/SocialProviderSpi.java | 2 +- .../services/org.keycloak.provider.Spi | 3 + services/pom.xml | 8 -- .../provider/HardcodedAttributeMapper.java | 0 .../broker/provider/HardcodedRoleMapper.java | 5 +- .../HardcodedUserSessionAttributeMapper.java | 0 .../resources/IdentityBrokerService.java | 2 +- .../admin/IdentityProviderResource.java | 2 +- .../admin/IdentityProvidersResource.java | 2 +- .../admin/info/ServerInfoAdminResource.java | 2 +- ...oak.broker.provider.IdentityProviderMapper | 0 social/core/pom.xml | 38 ------- .../services/org.keycloak.provider.Spi | 1 - .../keycloak/social/utils/SimpleHttpTest.java | 99 ------------------- .../keycloak/social/utils/ToJsonServlet.java | 52 ---------- .../keycloak/social/utils/UndertowServer.java | 63 ------------ social/facebook/pom.xml | 3 +- .../facebook/FacebookIdentityProvider.java | 2 +- .../FacebookIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 social/github/pom.xml | 3 +- .../social/github/GitHubIdentityProvider.java | 2 +- .../github/GitHubIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 social/google/pom.xml | 3 +- .../social/google/GoogleIdentityProvider.java | 2 +- .../google/GoogleIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 social/linkedin/pom.xml | 3 +- .../linkedin/LinkedInIdentityProvider.java | 2 +- .../LinkedInIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 social/pom.xml | 1 - social/stackoverflow/pom.xml | 3 +- .../StackoverflowIdentityProvider.java | 2 +- .../StackoverflowIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 social/twitter/pom.xml | 2 +- .../twitter/TwitterIdentityProvider.java | 2 +- .../TwitterIdentityProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 .../IdentityProviderRegistrationTest.java | 4 +- .../provider/social/CustomSocialProvider.java | 2 +- .../social/CustomSocialProviderFactory.java | 2 +- ...oker.social.SocialIdentityProviderFactory} | 0 89 files changed, 56 insertions(+), 450 deletions(-) delete mode 100755 broker/core/pom.xml delete mode 100755 broker/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi delete mode 100755 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-core/main/module.xml delete mode 100755 distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-core/main/module.xml rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderMapper.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/AuthenticationRequest.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/BrokeredIdentityContext.java (100%) create mode 100755 server-spi/src/main/java/org/keycloak/broker/provider/ConfigConstants.java rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/DefaultDataMarshaller.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityBrokerException.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProvider.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProviderDataMarshaller.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProviderFactory.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProviderMapper.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProviderMapperSpi.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/IdentityProviderSpi.java (100%) rename {broker/core => server-spi}/src/main/java/org/keycloak/broker/provider/util/SimpleHttp.java (100%) rename {social/core/src/main/java/org/keycloak => server-spi/src/main/java/org/keycloak/broker}/social/SocialIdentityProvider.java (96%) mode change 100644 => 100755 rename {social/core/src/main/java/org/keycloak => server-spi/src/main/java/org/keycloak/broker}/social/SocialIdentityProviderFactory.java (96%) mode change 100644 => 100755 rename {social/core/src/main/java/org/keycloak => server-spi/src/main/java/org/keycloak/broker}/social/SocialProviderSpi.java (97%) mode change 100644 => 100755 rename {broker/core => services}/src/main/java/org/keycloak/broker/provider/HardcodedAttributeMapper.java (100%) rename {broker/core => services}/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java (94%) rename {broker/core => services}/src/main/java/org/keycloak/broker/provider/HardcodedUserSessionAttributeMapper.java (100%) rename {broker/core => services}/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper (100%) delete mode 100755 social/core/pom.xml delete mode 100755 social/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi delete mode 100644 social/core/src/main/test/java/org/keycloak/social/utils/SimpleHttpTest.java delete mode 100755 social/core/src/main/test/java/org/keycloak/social/utils/ToJsonServlet.java delete mode 100644 social/core/src/main/test/java/org/keycloak/social/utils/UndertowServer.java mode change 100644 => 100755 social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProviderFactory.java rename social/facebook/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProviderFactory.java rename social/github/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProviderFactory.java rename social/google/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProviderFactory.java rename social/linkedin/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProviderFactory.java rename social/stackoverflow/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProviderFactory.java rename social/twitter/src/main/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) mode change 100644 => 100755 testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProviderFactory.java rename testsuite/integration/src/test/resources/META-INF/services/{org.keycloak.social.SocialIdentityProviderFactory => org.keycloak.broker.social.SocialIdentityProviderFactory} (100%) diff --git a/broker/core/pom.xml b/broker/core/pom.xml deleted file mode 100755 index 7230db7fd4..0000000000 --- a/broker/core/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - keycloak-parent - org.keycloak - 1.9.0.CR1-SNAPSHOT - ../../pom.xml - - 4.0.0 - - keycloak-broker-core - Keycloak Broker Core - - jar - - - - org.keycloak - keycloak-core - - - org.keycloak - keycloak-server-spi - - - org.jboss.resteasy - resteasy-jaxrs - - - log4j - log4j - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - - - - diff --git a/broker/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/broker/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi deleted file mode 100755 index 12925311aa..0000000000 --- a/broker/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi +++ /dev/null @@ -1,2 +0,0 @@ -org.keycloak.broker.provider.IdentityProviderSpi -org.keycloak.broker.provider.IdentityProviderMapperSpi \ No newline at end of file diff --git a/broker/oidc/pom.xml b/broker/oidc/pom.xml index a75c280aa0..704e50236c 100755 --- a/broker/oidc/pom.xml +++ b/broker/oidc/pom.xml @@ -21,7 +21,7 @@ org.keycloak - keycloak-broker-core + keycloak-server-spi com.fasterxml.jackson.core diff --git a/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ClaimToRoleMapper.java b/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ClaimToRoleMapper.java index 2d79a5b22b..2de346e41f 100755 --- a/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ClaimToRoleMapper.java +++ b/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ClaimToRoleMapper.java @@ -3,7 +3,7 @@ package org.keycloak.broker.oidc.mappers; import org.keycloak.broker.oidc.KeycloakOIDCIdentityProviderFactory; import org.keycloak.broker.oidc.OIDCIdentityProviderFactory; import org.keycloak.broker.provider.BrokeredIdentityContext; -import org.keycloak.broker.provider.HardcodedRoleMapper; +import org.keycloak.broker.provider.ConfigConstants; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.models.IdentityProviderMapperModel; import org.keycloak.models.KeycloakSession; @@ -42,7 +42,7 @@ public class ClaimToRoleMapper extends AbstractClaimMapper { property1.setType(ProviderConfigProperty.STRING_TYPE); configProperties.add(property1); property = new ProviderConfigProperty(); - property.setName(HardcodedRoleMapper.ROLE); + property.setName(ConfigConstants.ROLE); property.setLabel("Role"); property.setHelpText("Role to grant to user if claim is present. Click 'Select Role' button to browse roles, or just type it in the textbox. To reference an application role the syntax is appname.approle, i.e. myapp.myrole"); property.setType(ProviderConfigProperty.ROLE_TYPE); @@ -79,7 +79,7 @@ public class ClaimToRoleMapper extends AbstractClaimMapper { @Override public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { - String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); if (hasClaimValue(mapperModel, context)) { RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName); if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName); @@ -89,7 +89,7 @@ public class ClaimToRoleMapper extends AbstractClaimMapper { @Override public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { - String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); if (!hasClaimValue(mapperModel, context)) { RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName); if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName); diff --git a/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ExternalKeycloakRoleToRoleMapper.java b/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ExternalKeycloakRoleToRoleMapper.java index 52393656f6..84426581a2 100755 --- a/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ExternalKeycloakRoleToRoleMapper.java +++ b/broker/oidc/src/main/java/org/keycloak/broker/oidc/mappers/ExternalKeycloakRoleToRoleMapper.java @@ -3,7 +3,7 @@ package org.keycloak.broker.oidc.mappers; import org.keycloak.broker.oidc.KeycloakOIDCIdentityProvider; import org.keycloak.broker.oidc.KeycloakOIDCIdentityProviderFactory; import org.keycloak.broker.provider.BrokeredIdentityContext; -import org.keycloak.broker.provider.HardcodedRoleMapper; +import org.keycloak.broker.provider.ConfigConstants; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.models.IdentityProviderMapperModel; import org.keycloak.models.KeycloakSession; @@ -38,7 +38,7 @@ public class ExternalKeycloakRoleToRoleMapper extends AbstractClaimMapper { property1.setType(ProviderConfigProperty.STRING_TYPE); configProperties.add(property1); property = new ProviderConfigProperty(); - property.setName(HardcodedRoleMapper.ROLE); + property.setName(ConfigConstants.ROLE); property.setLabel("Role"); property.setHelpText("Role to grant to user if external role is present. Click 'Select Role' button to browse roles, or just type it in the textbox. To reference an application role the syntax is appname.approle, i.e. myapp.myrole"); property.setType(ProviderConfigProperty.ROLE_TYPE); @@ -84,7 +84,7 @@ public class ExternalKeycloakRoleToRoleMapper extends AbstractClaimMapper { private RoleModel hasRole(RealmModel realm,IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { JsonWebToken token = (JsonWebToken)context.getContextData().get(KeycloakOIDCIdentityProvider.VALIDATED_ACCESS_TOKEN); //if (token == null) return; - String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); String[] parseRole = KeycloakModelUtils.parseRole(mapperModel.getConfig().get(EXTERNAL_ROLE)); String externalRoleName = parseRole[1]; String claimName = null; diff --git a/broker/pom.xml b/broker/pom.xml index 55f62d3c43..910e5bf902 100755 --- a/broker/pom.xml +++ b/broker/pom.xml @@ -15,7 +15,6 @@ pom - core oidc saml diff --git a/broker/saml/pom.xml b/broker/saml/pom.xml index e30ec71958..756fd26fca 100755 --- a/broker/saml/pom.xml +++ b/broker/saml/pom.xml @@ -17,8 +17,7 @@ org.keycloak - keycloak-broker-core - provided + keycloak-server-spi org.keycloak diff --git a/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/AttributeToRoleMapper.java b/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/AttributeToRoleMapper.java index 3e1894beca..8a39bb75b1 100755 --- a/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/AttributeToRoleMapper.java +++ b/broker/saml/src/main/java/org/keycloak/broker/saml/mappers/AttributeToRoleMapper.java @@ -2,7 +2,7 @@ package org.keycloak.broker.saml.mappers; import org.keycloak.broker.provider.AbstractIdentityProviderMapper; import org.keycloak.broker.provider.BrokeredIdentityContext; -import org.keycloak.broker.provider.HardcodedRoleMapper; +import org.keycloak.broker.provider.ConfigConstants; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.broker.saml.SAMLEndpoint; import org.keycloak.broker.saml.SAMLIdentityProviderFactory; @@ -55,7 +55,7 @@ public class AttributeToRoleMapper extends AbstractIdentityProviderMapper { property.setType(ProviderConfigProperty.STRING_TYPE); configProperties.add(property); property = new ProviderConfigProperty(); - property.setName(HardcodedRoleMapper.ROLE); + property.setName(ConfigConstants.ROLE); property.setLabel("Role"); property.setHelpText("Role to grant to user. Click 'Select Role' button to browse roles, or just type it in the textbox. To reference an application role the syntax is appname.approle, i.e. myapp.myrole"); property.setType(ProviderConfigProperty.ROLE_TYPE); @@ -91,7 +91,7 @@ public class AttributeToRoleMapper extends AbstractIdentityProviderMapper { @Override public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { - String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); if (isAttributePresent(mapperModel, context)) { RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName); if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName); @@ -121,7 +121,7 @@ public class AttributeToRoleMapper extends AbstractIdentityProviderMapper { @Override public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { - String roleName = mapperModel.getConfig().get(HardcodedRoleMapper.ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); if (!isAttributePresent(mapperModel, context)) { RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName); if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName); diff --git a/dependencies/server-min/pom.xml b/dependencies/server-min/pom.xml index 978d81fe45..a25e991747 100755 --- a/dependencies/server-min/pom.xml +++ b/dependencies/server-min/pom.xml @@ -60,12 +60,6 @@ keycloak-js-adapter - - - org.keycloak - keycloak-social-core - - org.keycloak diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml index 71a0498e5b..057243c354 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml @@ -13,7 +13,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-core/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-core/main/module.xml deleted file mode 100755 index 61b5f74b50..0000000000 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-core/main/module.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-oidc/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-oidc/main/module.xml index 36c11ae40a..0c29957f51 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-oidc/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-oidc/main/module.xml @@ -10,7 +10,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-saml/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-saml/main/module.xml index 610c05686e..52b683ea41 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-saml/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-broker-saml/main/module.xml @@ -9,7 +9,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml index 0e1e9aadca..80b497ed9d 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml @@ -13,8 +13,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml index d440d1a512..97ea41003d 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml @@ -14,8 +14,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml index 9b37f66880..11022ecc63 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml @@ -32,7 +32,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml index 52208c2978..4c3ab595fc 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml @@ -9,7 +9,6 @@ - @@ -43,7 +42,6 @@ - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-core/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-core/main/module.xml deleted file mode 100755 index 9ac6be0901..0000000000 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-core/main/module.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-facebook/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-facebook/main/module.xml index 4060a8ce33..afe2d6a1ce 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-facebook/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-facebook/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-github/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-github/main/module.xml index 6506f3cbe7..c334beeb5c 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-github/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-github/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-google/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-google/main/module.xml index 5bfe0704ea..5c7b215938 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-google/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-google/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-linkedin/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-linkedin/main/module.xml index 29f523ef4f..0963a5c6d3 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-linkedin/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-linkedin/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-stackoverflow/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-stackoverflow/main/module.xml index b5b87c99c7..e5175ffb5f 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-stackoverflow/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-stackoverflow/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-twitter/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-twitter/main/module.xml index ee647211a8..d416c4be58 100755 --- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-twitter/main/module.xml +++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-social-twitter/main/module.xml @@ -9,8 +9,6 @@ - - diff --git a/forms/account-freemarker/pom.xml b/forms/account-freemarker/pom.xml index 1f729c206e..a5e937273c 100755 --- a/forms/account-freemarker/pom.xml +++ b/forms/account-freemarker/pom.xml @@ -39,11 +39,6 @@ keycloak-services provided - - org.keycloak - keycloak-social-core - provided - org.jboss.logging jboss-logging diff --git a/forms/login-freemarker/pom.xml b/forms/login-freemarker/pom.xml index 1da6dc7ed2..cfb77270d4 100755 --- a/forms/login-freemarker/pom.xml +++ b/forms/login-freemarker/pom.xml @@ -44,11 +44,6 @@ keycloak-services provided - - org.keycloak - keycloak-social-core - provided - org.jboss.resteasy resteasy-jaxrs diff --git a/pom.xml b/pom.xml index d8e753c38c..3921d97384 100755 --- a/pom.xml +++ b/pom.xml @@ -605,11 +605,6 @@ - - org.keycloak - keycloak-broker-core - ${project.version} - org.keycloak keycloak-broker-oidc @@ -1062,11 +1057,6 @@ keycloak-services ${project.version} - - org.keycloak - keycloak-social-core - ${project.version} - org.keycloak keycloak-social-facebook diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java b/server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java rename to server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProvider.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java b/server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java rename to server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderFactory.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderMapper.java b/server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderMapper.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderMapper.java rename to server-spi/src/main/java/org/keycloak/broker/provider/AbstractIdentityProviderMapper.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/AuthenticationRequest.java b/server-spi/src/main/java/org/keycloak/broker/provider/AuthenticationRequest.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/AuthenticationRequest.java rename to server-spi/src/main/java/org/keycloak/broker/provider/AuthenticationRequest.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/BrokeredIdentityContext.java b/server-spi/src/main/java/org/keycloak/broker/provider/BrokeredIdentityContext.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/BrokeredIdentityContext.java rename to server-spi/src/main/java/org/keycloak/broker/provider/BrokeredIdentityContext.java diff --git a/server-spi/src/main/java/org/keycloak/broker/provider/ConfigConstants.java b/server-spi/src/main/java/org/keycloak/broker/provider/ConfigConstants.java new file mode 100755 index 0000000000..e56627980b --- /dev/null +++ b/server-spi/src/main/java/org/keycloak/broker/provider/ConfigConstants.java @@ -0,0 +1,9 @@ +package org.keycloak.broker.provider; + +/** + * @author Bill Burke + * @version $Revision: 1 $ + */ +public interface ConfigConstants { + String ROLE = "role"; +} diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/DefaultDataMarshaller.java b/server-spi/src/main/java/org/keycloak/broker/provider/DefaultDataMarshaller.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/DefaultDataMarshaller.java rename to server-spi/src/main/java/org/keycloak/broker/provider/DefaultDataMarshaller.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityBrokerException.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityBrokerException.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityBrokerException.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityBrokerException.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProvider.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProvider.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProvider.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderDataMarshaller.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderDataMarshaller.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderDataMarshaller.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderDataMarshaller.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderFactory.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderFactory.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderFactory.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderFactory.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderMapper.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderMapper.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderMapper.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderMapper.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderMapperSpi.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderMapperSpi.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderMapperSpi.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderMapperSpi.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderSpi.java b/server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderSpi.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/IdentityProviderSpi.java rename to server-spi/src/main/java/org/keycloak/broker/provider/IdentityProviderSpi.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/util/SimpleHttp.java b/server-spi/src/main/java/org/keycloak/broker/provider/util/SimpleHttp.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/util/SimpleHttp.java rename to server-spi/src/main/java/org/keycloak/broker/provider/util/SimpleHttp.java diff --git a/social/core/src/main/java/org/keycloak/social/SocialIdentityProvider.java b/server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProvider.java old mode 100644 new mode 100755 similarity index 96% rename from social/core/src/main/java/org/keycloak/social/SocialIdentityProvider.java rename to server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProvider.java index 9cc31ae726..d724781a0a --- a/social/core/src/main/java/org/keycloak/social/SocialIdentityProvider.java +++ b/server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProvider.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.keycloak.social; +package org.keycloak.broker.social; import org.keycloak.broker.provider.IdentityProvider; import org.keycloak.models.IdentityProviderModel; diff --git a/social/core/src/main/java/org/keycloak/social/SocialIdentityProviderFactory.java b/server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProviderFactory.java old mode 100644 new mode 100755 similarity index 96% rename from social/core/src/main/java/org/keycloak/social/SocialIdentityProviderFactory.java rename to server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProviderFactory.java index 9c7f59fad1..cc5fdd5364 --- a/social/core/src/main/java/org/keycloak/social/SocialIdentityProviderFactory.java +++ b/server-spi/src/main/java/org/keycloak/broker/social/SocialIdentityProviderFactory.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.keycloak.social; +package org.keycloak.broker.social; import org.keycloak.broker.provider.IdentityProviderFactory; diff --git a/social/core/src/main/java/org/keycloak/social/SocialProviderSpi.java b/server-spi/src/main/java/org/keycloak/broker/social/SocialProviderSpi.java old mode 100644 new mode 100755 similarity index 97% rename from social/core/src/main/java/org/keycloak/social/SocialProviderSpi.java rename to server-spi/src/main/java/org/keycloak/broker/social/SocialProviderSpi.java index 382c18d9bb..e3af0a5555 --- a/social/core/src/main/java/org/keycloak/social/SocialProviderSpi.java +++ b/server-spi/src/main/java/org/keycloak/broker/social/SocialProviderSpi.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.keycloak.social; +package org.keycloak.broker.social; import org.keycloak.provider.Provider; import org.keycloak.provider.ProviderFactory; diff --git a/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi index 907917f967..5a4ee96ae6 100755 --- a/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi +++ b/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi @@ -15,4 +15,7 @@ org.keycloak.services.managers.BruteForceProtectorSpi org.keycloak.protocol.ClientInstallationSpi org.keycloak.protocol.LoginProtocolSpi org.keycloak.protocol.ProtocolMapperSpi +org.keycloak.broker.provider.IdentityProviderSpi +org.keycloak.broker.provider.IdentityProviderMapperSpi +org.keycloak.broker.social.SocialProviderSpi diff --git a/services/pom.xml b/services/pom.xml index 816134e584..c72ae849b9 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -63,14 +63,6 @@ org.keycloak keycloak-invalidation-cache-model - - org.keycloak - keycloak-social-core - - - org.keycloak - keycloak-broker-core - org.jboss.spec.javax.servlet jboss-servlet-api_3.0_spec diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/HardcodedAttributeMapper.java b/services/src/main/java/org/keycloak/broker/provider/HardcodedAttributeMapper.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/HardcodedAttributeMapper.java rename to services/src/main/java/org/keycloak/broker/provider/HardcodedAttributeMapper.java diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java b/services/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java similarity index 94% rename from broker/core/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java rename to services/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java index 6f0b02a5e0..4cce9d6daf 100755 --- a/broker/core/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java +++ b/services/src/main/java/org/keycloak/broker/provider/HardcodedRoleMapper.java @@ -16,13 +16,12 @@ import java.util.List; * @version $Revision: 1 $ */ public class HardcodedRoleMapper extends AbstractIdentityProviderMapper { - public static final String ROLE = "role"; protected static final List configProperties = new ArrayList<>(); static { ProviderConfigProperty property; property = new ProviderConfigProperty(); - property.setName(ROLE); + property.setName(ConfigConstants.ROLE); property.setLabel("Role"); property.setHelpText("Role to grant to user. Click 'Select Role' button to browse roles, or just type it in the textbox. To reference an application role the syntax is appname.approle, i.e. myapp.myrole"); property.setType(ProviderConfigProperty.ROLE_TYPE); @@ -61,7 +60,7 @@ public class HardcodedRoleMapper extends AbstractIdentityProviderMapper { @Override public void importNewUser(KeycloakSession session, RealmModel realm, UserModel user, IdentityProviderMapperModel mapperModel, BrokeredIdentityContext context) { - String roleName = mapperModel.getConfig().get(ROLE); + String roleName = mapperModel.getConfig().get(ConfigConstants.ROLE); RoleModel role = KeycloakModelUtils.getRoleFromString(realm, roleName); if (role == null) throw new IdentityBrokerException("Unable to find role: " + roleName); user.grantRole(role); diff --git a/broker/core/src/main/java/org/keycloak/broker/provider/HardcodedUserSessionAttributeMapper.java b/services/src/main/java/org/keycloak/broker/provider/HardcodedUserSessionAttributeMapper.java similarity index 100% rename from broker/core/src/main/java/org/keycloak/broker/provider/HardcodedUserSessionAttributeMapper.java rename to services/src/main/java/org/keycloak/broker/provider/HardcodedUserSessionAttributeMapper.java diff --git a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java index 975063a291..57a2d26439 100755 --- a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java +++ b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java @@ -62,7 +62,7 @@ import org.keycloak.services.ErrorResponse; import org.keycloak.services.ErrorPage; import org.keycloak.services.Urls; import org.keycloak.services.validation.Validation; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; import org.keycloak.common.util.ObjectUtil; import org.keycloak.util.JsonSerialization; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProviderResource.java b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProviderResource.java index f824a0eaaf..4b166478b0 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProviderResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProviderResource.java @@ -24,7 +24,7 @@ import org.keycloak.representations.idm.IdentityProviderMapperRepresentation; import org.keycloak.representations.idm.IdentityProviderMapperTypeRepresentation; import org.keycloak.representations.idm.IdentityProviderRepresentation; import org.keycloak.services.ErrorResponse; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java index 84bbdad573..26bf8a9857 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/IdentityProvidersResource.java @@ -18,7 +18,7 @@ import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.provider.ProviderFactory; import org.keycloak.representations.idm.IdentityProviderRepresentation; import org.keycloak.services.ErrorResponse; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/info/ServerInfoAdminResource.java b/services/src/main/java/org/keycloak/services/resources/admin/info/ServerInfoAdminResource.java index dfefb10792..624b38f9ca 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/info/ServerInfoAdminResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/info/ServerInfoAdminResource.java @@ -33,7 +33,7 @@ import org.keycloak.representations.idm.ConfigPropertyRepresentation; import org.keycloak.representations.idm.ProtocolMapperRepresentation; import org.keycloak.representations.idm.ProtocolMapperTypeRepresentation; import org.keycloak.representations.info.*; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * @author Stian Thorgersen diff --git a/broker/core/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper b/services/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper similarity index 100% rename from broker/core/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper rename to services/src/main/resources/META-INF/services/org.keycloak.broker.provider.IdentityProviderMapper diff --git a/social/core/pom.xml b/social/core/pom.xml deleted file mode 100755 index dc8327bf03..0000000000 --- a/social/core/pom.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - keycloak-social-parent - org.keycloak - 1.9.0.CR1-SNAPSHOT - ../pom.xml - - 4.0.0 - - keycloak-social-core - Keycloak Social Core - - - - - org.keycloak - keycloak-broker-core - - - junit - junit - test - - - io.undertow - undertow-servlet - test - - - io.undertow - undertow-core - test - - - - diff --git a/social/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/social/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi deleted file mode 100755 index f16073002c..0000000000 --- a/social/core/src/main/resources/META-INF/services/org.keycloak.provider.Spi +++ /dev/null @@ -1 +0,0 @@ -org.keycloak.social.SocialProviderSpi \ No newline at end of file diff --git a/social/core/src/main/test/java/org/keycloak/social/utils/SimpleHttpTest.java b/social/core/src/main/test/java/org/keycloak/social/utils/SimpleHttpTest.java deleted file mode 100644 index 55c132124e..0000000000 --- a/social/core/src/main/test/java/org/keycloak/social/utils/SimpleHttpTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.keycloak.social.utils; - -import io.undertow.servlet.api.DeploymentInfo; -import io.undertow.servlet.api.ServletInfo; -import com.fasterxml.jackson.databind.JsonNode; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import java.io.IOException; - -import static io.undertow.servlet.Servlets.servlet; -import static org.junit.Assert.assertEquals; - -/** - * @author Stian Thorgersen - */ -public class SimpleHttpTest { - - private UndertowServer server; - - @Before - public void before() { - server = new UndertowServer("localhost", 8081); - - DeploymentInfo deploymentInfo = new DeploymentInfo(); - deploymentInfo.setClassLoader(getClass().getClassLoader()); - deploymentInfo.setDeploymentName("test"); - deploymentInfo.setContextPath("/"); - - ServletInfo servlet = servlet("ToJsonServlet", ToJsonServlet.class) - .addMapping("/tojson"); - - deploymentInfo.addServlet(servlet); - - server.deploy(deploymentInfo); - - server.start(); - } - - @After - public void after() { - server.stop(); - } - - @Test - public void testPostNoParams() throws IOException { - JsonNode o = SimpleHttp.doPost("http://localhost:8081/tojson").asJson(); - JsonNode p = o.get("params"); - - assertEquals(0, p.size()); - } - - @Test - public void testPost() throws IOException { - JsonNode o = SimpleHttp.doPost("http://localhost:8081/tojson").param("key-one", "value one ;)").param("key-two", "value two!&").asJson(); - JsonNode p = o.get("params"); - - assertEquals(2, p.size()); - assertEquals("value one ;)", p.get("key-one").getTextValue()); - assertEquals("value two!&", p.get("key-two").getTextValue()); - } - - @Test - public void testPostCustomHeader() throws IOException { - JsonNode o = SimpleHttp.doPost("http://localhost:8081/tojson").header("Accept", "application/json").header("Authorization", "bearer dsfsadfsdf").asJson(); - JsonNode h = o.get("headers"); - - assertEquals("application/json", h.get("Accept").getTextValue()); - assertEquals("bearer dsfsadfsdf", h.get("Authorization").getTextValue()); - } - - @Test - public void testGetNoParams() throws IOException { - JsonNode o = SimpleHttp.doGet("http://localhost:8081/tojson").asJson(); - JsonNode p = o.get("params"); - - assertEquals(0, p.size()); - } - - @Test - public void testGet() throws IOException { - JsonNode o = SimpleHttp.doGet("http://localhost:8081/tojson").param("key-one", "value one ;)").param("key-two", "value two!&").asJson(); - JsonNode p = o.get("params"); - - assertEquals(2, p.size()); - assertEquals("value one ;)", p.get("key-one").getTextValue()); - assertEquals("value two!&", p.get("key-two").getTextValue()); - } - - @Test - public void testGetCustomHeader() throws IOException { - JsonNode o = SimpleHttp.doGet("http://localhost:8081/tojson").header("Authorization", "bearer dsfsadfsdf").asJson(); - JsonNode h = o.get("headers"); - - assertEquals("bearer dsfsadfsdf", h.get("Authorization").getTextValue()); - } - -} diff --git a/social/core/src/main/test/java/org/keycloak/social/utils/ToJsonServlet.java b/social/core/src/main/test/java/org/keycloak/social/utils/ToJsonServlet.java deleted file mode 100755 index cd5fda9133..0000000000 --- a/social/core/src/main/test/java/org/keycloak/social/utils/ToJsonServlet.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.keycloak.social.utils; - -import com.fasterxml.jackson.databind.ObjectMapper; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Enumeration; - -/** - * @author Stian Thorgersen - */ -public class ToJsonServlet extends HttpServlet { - - private static final ObjectMapper mapper = new ObjectMapper(); - - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - toJson(req, resp); - } - - @Override - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - toJson(req, resp); - } - - private void toJson(HttpServletRequest req, HttpServletResponse resp) throws IOException { - ObjectNode o = mapper.createObjectNode(); - - ObjectNode headers = mapper.createObjectNode(); - Enumeration headerNames = req.getHeaderNames(); - while (headerNames.hasMoreElements()) { - String n = headerNames.nextElement(); - headers.put(n, req.getHeader(n)); - } - o.put("headers", headers); - - ObjectNode params = mapper.createObjectNode(); - Enumeration parameterNames = req.getParameterNames(); - while (parameterNames.hasMoreElements()) { - String n = parameterNames.nextElement(); - params.put(n, req.getParameter(n)); - } - o.put("params", params); - - resp.setContentType("application/json"); - resp.getOutputStream().write(o.toString().getBytes()); - } - -} diff --git a/social/core/src/main/test/java/org/keycloak/social/utils/UndertowServer.java b/social/core/src/main/test/java/org/keycloak/social/utils/UndertowServer.java deleted file mode 100644 index f856a429c6..0000000000 --- a/social/core/src/main/test/java/org/keycloak/social/utils/UndertowServer.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.keycloak.social.utils; - -import io.undertow.Undertow; -import io.undertow.server.handlers.PathHandler; -import io.undertow.servlet.api.DeploymentInfo; -import io.undertow.servlet.api.DeploymentManager; -import io.undertow.servlet.api.ServletContainer; - -import javax.servlet.ServletException; - -/** - * @author Stian Thorgersen - */ -public class UndertowServer { - - private PathHandler root; - private ServletContainer container; - private Undertow server; - private String hostname; - private int port; - - public UndertowServer(String hostname, int port) { - this.hostname = hostname; - this.port = port; - - root = new PathHandler(); - container = ServletContainer.Factory.newInstance(); - } - - public void start() { - Undertow.Builder builder = Undertow.builder().addListener(port, hostname); - server = builder.setHandler(root).build(); - server.start(); - } - - public void stop() { - if (server != null) { - server.stop(); - server = null; - } - } - - public void deploy(DeploymentInfo deploymentInfo) { - DeploymentManager manager = container.addDeployment(deploymentInfo); - manager.deploy(); - try { - root.addPath(deploymentInfo.getContextPath(), manager.start()); - } catch (ServletException e) { - throw new RuntimeException(e); - } - } - - public void undeploy(String deploymentName) { - DeploymentManager deployment = container.getDeployment(deploymentName); - try { - deployment.stop(); - } catch (ServletException e) { - throw new RuntimeException(e); - } - } - -} - diff --git a/social/facebook/pom.xml b/social/facebook/pom.xml index 5aa59ec362..2be4f56f3d 100755 --- a/social/facebook/pom.xml +++ b/social/facebook/pom.xml @@ -16,8 +16,7 @@ org.keycloak - keycloak-social-core - provided + keycloak-server-spi org.keycloak diff --git a/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProvider.java b/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProvider.java index 769634a7be..438a277e9d 100755 --- a/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProvider.java +++ b/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProvider.java @@ -8,7 +8,7 @@ import org.keycloak.broker.oidc.util.JsonSimpleHttp; import org.keycloak.broker.provider.BrokeredIdentityContext; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.broker.provider.util.SimpleHttp; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * @author Stian Thorgersen diff --git a/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProviderFactory.java b/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProviderFactory.java old mode 100644 new mode 100755 index 57f484e28e..a43e560573 --- a/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProviderFactory.java +++ b/social/facebook/src/main/java/org/keycloak/social/facebook/FacebookIdentityProviderFactory.java @@ -20,7 +20,7 @@ package org.keycloak.social.facebook; import org.keycloak.broker.oidc.OAuth2IdentityProviderConfig; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Pedro Igor diff --git a/social/facebook/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/facebook/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/facebook/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/facebook/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/social/github/pom.xml b/social/github/pom.xml index 358f877f08..4159281ff3 100755 --- a/social/github/pom.xml +++ b/social/github/pom.xml @@ -16,8 +16,7 @@ org.keycloak - keycloak-social-core - provided + keycloak-server-spi org.keycloak diff --git a/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java b/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java index 31dc4ebead..a6bc116787 100755 --- a/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java +++ b/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProvider.java @@ -8,7 +8,7 @@ import org.keycloak.broker.oidc.util.JsonSimpleHttp; import org.keycloak.broker.provider.BrokeredIdentityContext; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.broker.provider.util.SimpleHttp; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * @author Stian Thorgersen diff --git a/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProviderFactory.java b/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProviderFactory.java old mode 100644 new mode 100755 index ed06598b8a..8ecc73abac --- a/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProviderFactory.java +++ b/social/github/src/main/java/org/keycloak/social/github/GitHubIdentityProviderFactory.java @@ -20,7 +20,7 @@ package org.keycloak.social.github; import org.keycloak.broker.oidc.OAuth2IdentityProviderConfig; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Pedro Igor diff --git a/social/github/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/github/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/github/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/github/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/social/google/pom.xml b/social/google/pom.xml index afbc1921a8..a1c486df56 100755 --- a/social/google/pom.xml +++ b/social/google/pom.xml @@ -16,8 +16,7 @@ org.keycloak - keycloak-social-core - provided + keycloak-server-spi org.keycloak diff --git a/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProvider.java b/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProvider.java index 120212eec5..b85e36d7d7 100755 --- a/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProvider.java +++ b/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProvider.java @@ -23,7 +23,7 @@ package org.keycloak.social.google; import org.keycloak.broker.oidc.OIDCIdentityProvider; import org.keycloak.broker.oidc.OIDCIdentityProviderConfig; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * @author Stian Thorgersen diff --git a/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProviderFactory.java b/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProviderFactory.java old mode 100644 new mode 100755 index 5171c4f7a5..19f1a79786 --- a/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProviderFactory.java +++ b/social/google/src/main/java/org/keycloak/social/google/GoogleIdentityProviderFactory.java @@ -20,7 +20,7 @@ package org.keycloak.social.google; import org.keycloak.broker.oidc.OIDCIdentityProviderConfig; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Pedro Igor diff --git a/social/google/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/google/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/google/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/google/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/social/linkedin/pom.xml b/social/linkedin/pom.xml index 0bb59ce761..ef34543223 100755 --- a/social/linkedin/pom.xml +++ b/social/linkedin/pom.xml @@ -16,8 +16,7 @@ org.keycloak - keycloak-social-core - provided + keycloak-server-spi org.keycloak diff --git a/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProvider.java b/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProvider.java index 1073a87b84..c898d5b7be 100755 --- a/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProvider.java +++ b/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProvider.java @@ -30,7 +30,7 @@ import org.keycloak.broker.oidc.util.JsonSimpleHttp; import org.keycloak.broker.provider.BrokeredIdentityContext; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.broker.provider.util.SimpleHttp; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * LinkedIn social provider. See https://developer.linkedin.com/docs/oauth2 diff --git a/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProviderFactory.java b/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProviderFactory.java old mode 100644 new mode 100755 index 958a513922..e39d5da0e8 --- a/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProviderFactory.java +++ b/social/linkedin/src/main/java/org/keycloak/social/linkedin/LinkedInIdentityProviderFactory.java @@ -20,7 +20,7 @@ package org.keycloak.social.linkedin; import org.keycloak.broker.oidc.OAuth2IdentityProviderConfig; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Vlastimil Elias (velias at redhat dot com) diff --git a/social/linkedin/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/linkedin/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/linkedin/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/linkedin/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/social/pom.xml b/social/pom.xml index fed75d4357..3e08de0162 100755 --- a/social/pom.xml +++ b/social/pom.xml @@ -15,7 +15,6 @@ pom - core github google twitter diff --git a/social/stackoverflow/pom.xml b/social/stackoverflow/pom.xml index e4c361d7a2..eff0902ef8 100755 --- a/social/stackoverflow/pom.xml +++ b/social/stackoverflow/pom.xml @@ -16,8 +16,7 @@ org.keycloak - keycloak-social-core - provided + keycloak-server-spi org.keycloak diff --git a/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProvider.java b/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProvider.java index 14f3956af4..c818e964a5 100755 --- a/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProvider.java +++ b/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProvider.java @@ -31,7 +31,7 @@ import org.keycloak.broker.oidc.util.JsonSimpleHttp; import org.keycloak.broker.provider.BrokeredIdentityContext; import org.keycloak.broker.provider.IdentityBrokerException; import org.keycloak.broker.provider.util.SimpleHttp; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; /** * Stackoverflow social provider. See https://api.stackexchange.com/docs/authentication diff --git a/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProviderFactory.java b/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProviderFactory.java old mode 100644 new mode 100755 index d02c2d7261..aa0ce76b1e --- a/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProviderFactory.java +++ b/social/stackoverflow/src/main/java/org/keycloak/social/stackoverflow/StackoverflowIdentityProviderFactory.java @@ -19,7 +19,7 @@ package org.keycloak.social.stackoverflow; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Vlastimil Elias (velias at redhat dot com) diff --git a/social/stackoverflow/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/stackoverflow/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/stackoverflow/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/stackoverflow/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/social/twitter/pom.xml b/social/twitter/pom.xml index 9fa1e26985..d7941b9ebe 100755 --- a/social/twitter/pom.xml +++ b/social/twitter/pom.xml @@ -16,7 +16,7 @@ org.keycloak - keycloak-social-core + keycloak-server-spi org.keycloak diff --git a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProvider.java b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProvider.java index 8e9ad53f60..0ddb3c079a 100755 --- a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProvider.java +++ b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProvider.java @@ -38,7 +38,7 @@ import org.keycloak.models.RealmModel; import org.keycloak.services.managers.ClientSessionCode; import org.keycloak.services.messages.Messages; import org.keycloak.services.ErrorPage; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.auth.AccessToken; diff --git a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProviderFactory.java b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProviderFactory.java old mode 100644 new mode 100755 index 21730c5ed0..c04cf4c5dc --- a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProviderFactory.java +++ b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterIdentityProviderFactory.java @@ -20,7 +20,7 @@ package org.keycloak.social.twitter; import org.keycloak.broker.oidc.OAuth2IdentityProviderConfig; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author Pedro Igor diff --git a/social/twitter/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/social/twitter/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from social/twitter/src/main/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to social/twitter/src/main/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderRegistrationTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderRegistrationTest.java index 3f088ab0f0..4db89e98d7 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderRegistrationTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/IdentityProviderRegistrationTest.java @@ -21,8 +21,8 @@ import org.junit.Test; import org.keycloak.broker.provider.IdentityProvider; import org.keycloak.broker.provider.IdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProvider; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProviderFactory; import org.keycloak.testsuite.broker.provider.CustomIdentityProvider; import org.keycloak.testsuite.broker.provider.CustomIdentityProviderFactory; import org.keycloak.testsuite.broker.provider.social.CustomSocialProvider; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProvider.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProvider.java index bbead3c2e4..97e1c9d5e6 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProvider.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProvider.java @@ -21,7 +21,7 @@ import org.keycloak.broker.provider.AbstractIdentityProvider; import org.keycloak.broker.provider.AuthenticationRequest; import org.keycloak.models.FederatedIdentityModel; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProvider; +import org.keycloak.broker.social.SocialIdentityProvider; import javax.ws.rs.core.Response; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProviderFactory.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProviderFactory.java old mode 100644 new mode 100755 index 1d8d8b1432..72830e9fdf --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProviderFactory.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/provider/social/CustomSocialProviderFactory.java @@ -19,7 +19,7 @@ package org.keycloak.testsuite.broker.provider.social; import org.keycloak.broker.provider.AbstractIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; -import org.keycloak.social.SocialIdentityProviderFactory; +import org.keycloak.broker.social.SocialIdentityProviderFactory; /** * @author pedroigor diff --git a/testsuite/integration/src/test/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory b/testsuite/integration/src/test/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory similarity index 100% rename from testsuite/integration/src/test/resources/META-INF/services/org.keycloak.social.SocialIdentityProviderFactory rename to testsuite/integration/src/test/resources/META-INF/services/org.keycloak.broker.social.SocialIdentityProviderFactory