From 9aa6b4cbfab95273075c074113f9ca4b5654f2ac Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sun, 10 Aug 2014 12:17:45 -0400 Subject: [PATCH] optimize imports --- .../audit/email/EmailAuditListener.java | 2 +- .../keycloak/audit/mongo/MongoEventQuery.java | 1 - .../DefaultJpaConnectionProviderFactory.java | 1 - ...derationProviderFactoryRepresentation.java | 2 - .../keycloak/util/StringPropertyReplacer.java | 2 +- distribution/modules/lib.xml | 2 +- .../src/main/webapp/admin/admin.jsp | 2 +- .../org/keycloak/example/CustomerCli.java | 1 - .../org/keycloak/example/AdminClient.java | 1 - .../src/main/webapp/admin/admin.jsp | 2 +- .../src/main/webapp/customers/view.jsp | 6 +-- .../main/webapp/products/servlet-logout.jsp | 5 +-- .../src/main/webapp/products/view.jsp | 2 +- .../example/oauth/AppContextListener.java | 13 +++---- .../example/oauth/CDIResourcesProducer.java | 4 +- .../example/oauth/RefreshTokenFilter.java | 11 +++--- .../oauth/ServletRequestQualifier.java | 3 +- .../org/keycloak/example/oauth/UserData.java | 5 +-- .../src/main/webapp/WEB-INF/faces-config.xml | 4 +- .../src/main/webapp/client.xhtml | 5 ++- .../org/keycloak/example/oauth/Bootstrap.java | 2 - .../ClasspathPropertiesFederationFactory.java | 9 ----- ...ClasspathPropertiesFederationProvider.java | 9 ----- .../FilePropertiesFederationProvider.java | 9 ----- .../properties/WritableUserModelProxy.java | 2 - .../keycloak/exportimport/ExportProvider.java | 5 +-- .../keycloak/exportimport/ImportProvider.java | 5 +-- .../exportimport/util/ExportImportJob.java | 4 +- .../exportimport/util/ExportImportUtils.java | 5 +-- .../exportimport/util/ExportUtils.java | 22 +++++------ .../exportimport/util/ImportUtils.java | 14 +++---- .../util/MultipleStepsExportProvider.java | 6 +-- .../exportimport/dir/DirExportProvider.java | 10 ++--- .../dir/DirExportProviderFactory.java | 4 +- .../exportimport/dir/DirImportProvider.java | 14 +++---- .../dir/DirImportProviderFactory.java | 4 +- .../singlefile/SingleFileExportProvider.java | 12 +++--- .../SingleFileExportProviderFactory.java | 4 +- .../singlefile/SingleFileImportProvider.java | 13 ++----- .../SingleFileImportProviderFactory.java | 4 +- .../exportimport/zip/ZipExportProvider.java | 12 +++--- .../zip/ZipExportProviderFactory.java | 4 +- .../exportimport/zip/ZipImportProvider.java | 16 ++++---- .../zip/ZipImportProviderFactory.java | 4 +- .../ldap/LDAPFederationProvider.java | 10 ++--- .../ldap/LDAPFederationProviderFactory.java | 2 +- .../ldap/ReadonlyLDAPUserModelDelegate.java | 7 ---- .../ldap/UnsyncedLDAPUserModelDelegate.java | 8 ---- .../freemarker/model/AccountSocialBean.java | 15 ++++--- .../account/freemarker/model/TotpBean.java | 1 - .../account/freemarker/model/UrlBean.java | 1 - .../keycloak/freemarker/FreeMarkerUtil.java | 3 -- .../keycloak/theme/FolderThemeProvider.java | 1 - .../freemarker/model/OAuthGrantBean.java | 2 - .../login/freemarker/model/UrlBean.java | 1 - .../keycloak/adapters/KeycloakAccount.java | 3 -- .../keycloak/adapters/KeycloakDeployment.java | 1 - .../adapters/KeycloakDeploymentBuilder.java | 3 -- .../RefreshableKeycloakSecurityContext.java | 2 +- .../org/keycloak/adapters/ServerRequest.java | 1 - .../org/keycloak/admin/client/Keycloak.java | 1 - .../client/resource/ApplicationResource.java | 9 ++++- .../client/resource/ApplicationsResource.java | 7 +++- .../client/resource/OAuthClientResource.java | 8 +++- .../client/resource/OAuthClientsResource.java | 7 +++- .../client/resource/RoleMappingResource.java | 6 ++- .../admin/client/resource/RoleResource.java | 9 ++++- .../client/resource/RoleScopeResource.java | 7 +++- .../admin/client/resource/RolesResource.java | 7 +++- .../admin/client/resource/UserResource.java | 8 +++- .../admin/client/resource/UsersResource.java | 8 +++- .../admin/client/token/TokenService.java | 6 ++- .../extension/CredentialAddHandler.java | 4 +- ...cloakAdapterConfigDeploymentProcessor.java | 5 ++- .../extension/KeycloakSubsystemAdd.java | 4 +- .../subsystem/extension/RealmDefinition.java | 20 ++++------ .../extension/RealmWriteAttributeHandler.java | 3 +- .../extension/SecureDeploymentAddHandler.java | 5 ++- .../extension/SecureDeploymentDefinition.java | 9 +++-- ...SecureDeploymentWriteAttributeHandler.java | 3 +- .../subsystem/logging/KeycloakLogger.java | 2 +- .../as7/AuthenticatedActionsValve.java | 7 ---- .../adapters/as7/CatalinaHttpFacade.java | 2 - .../as7/CatalinaUserSessionManagement.java | 2 - .../adapters/as7/CorsPreflightChecker.java | 1 - .../as7/KeycloakAuthenticatorValve.java | 1 - .../jaxrs/JaxrsBearerTokenFilter.java | 2 +- .../keycloak/servlet/ServletOAuthClient.java | 1 - .../tomcat7/AuthenticatedActionsValve.java | 11 +++--- .../adapters/tomcat7/CatalinaHttpFacade.java | 11 +++--- .../tomcat7/CatalinaRequestAuthenticator.java | 12 +++--- .../CatalinaSecurityContextHelper.java | 11 +++--- .../CatalinaUserSessionManagement.java | 16 ++++---- .../tomcat7/CorsPreflightChecker.java | 7 ++-- .../tomcat7/KeycloakAuthenticatorValve.java | 21 +++++----- .../undertow/KeycloakServletExtension.java | 3 +- .../undertow/ServletKeycloakAuthMech.java | 3 -- .../ServletPreAuthActionsHandler.java | 1 - .../undertow/ServletRequestAuthenticator.java | 4 +- .../adapters/undertow/UndertowHttpFacade.java | 2 - .../undertow/UndertowKeycloakAuthMech.java | 5 --- .../UndertowUserSessionManagement.java | 2 - .../WildflyKeycloakServletExtension.java | 1 - .../extension/CredentialAddHandler.java | 3 +- .../extension/CredentialDefinition.java | 1 - ...cloakAdapterConfigDeploymentProcessor.java | 5 ++- .../KeycloakAdapterConfigService.java | 5 ++- .../KeycloakDependencyProcessor.java | 2 - .../extension/KeycloakExtension.java | 2 +- .../extension/KeycloakSubsystemAdd.java | 4 +- .../extension/KeycloakSubsystemParser.java | 11 +++--- .../subsystem/extension/RealmAddHandler.java | 5 ++- .../subsystem/extension/RealmDefinition.java | 18 ++++----- .../extension/RealmWriteAttributeHandler.java | 3 +- .../extension/SecureDeploymentAddHandler.java | 5 ++- .../extension/SecureDeploymentDefinition.java | 9 +++-- ...SecureDeploymentWriteAttributeHandler.java | 3 +- .../extension/SharedAttributeDefinitons.java | 5 ++- .../subsystem/logging/KeycloakLogger.java | 6 +-- .../subsystem/logging/KeycloakMessages.java | 2 +- .../extension/SubsystemParsingTestCase.java | 6 +-- .../models/UserFederationProviderFactory.java | 1 - .../models/utils/ModelToRepresentation.java | 4 +- .../models/utils/RepresentationToModel.java | 6 +-- .../cache/DefaultCacheRealmProvider.java | 3 +- .../models/cache/NoCacheRealmProvider.java | 2 +- .../keycloak/models/cache/RealmAdapter.java | 4 +- .../cache/entities/CachedApplication.java | 2 +- .../models/cache/entities/CachedClient.java | 2 +- .../cache/entities/CachedOAuthClient.java | 2 +- .../models/cache/entities/CachedRealm.java | 6 +-- .../models/jpa/ApplicationAdapter.java | 1 - .../keycloak/models/jpa/JpaRealmProvider.java | 2 +- .../org/keycloak/models/jpa/RealmAdapter.java | 6 +-- .../jpa/entities/ApplicationEntity.java | 1 - .../models/jpa/entities/CredentialEntity.java | 2 - .../jpa/entities/OAuthClientEntity.java | 1 - .../jpa/entities/ScopeMappingEntity.java | 1 - .../models/jpa/entities/UserEntity.java | 12 ------ .../UserFederationProviderEntity.java | 2 - .../entities/UserRequiredActionEntity.java | 1 - .../keycloak/adapters/ClientAdapter.java | 2 +- .../keycloak/adapters/MongoRealmProvider.java | 2 +- .../mongo/keycloak/adapters/RealmAdapter.java | 8 ++-- .../jpa/entities/ClientSessionEntity.java | 4 -- .../jpa/entities/UserSessionEntity.java | 2 - .../entities/UsernameLoginFailureEntity.java | 1 - .../sessions/mem/UserSessionAdapter.java | 1 - .../entities/MongoClientSessionEntity.java | 2 - .../entities/MongoUserSessionEntity.java | 2 - .../picketlink/idm/KeycloakEventBridge.java | 8 ++-- .../ldap/PartitionManagerRegistry.java | 15 +++---- .../services/DefaultKeycloakSession.java | 2 +- .../services/managers/AppAuthManager.java | 1 - .../services/managers/ApplianceBootstrap.java | 2 +- .../services/managers/AuditManager.java | 2 +- .../managers/AuthenticationManager.java | 2 +- .../managers/BruteForceProtector.java | 2 +- .../services/managers/RealmManager.java | 2 +- .../services/resources/RealmsResource.java | 2 +- .../resources/RequiredActionsService.java | 2 +- .../services/resources/SocialResource.java | 2 +- .../services/resources/TokenService.java | 4 +- .../admin/UserFederationResource.java | 39 ------------------- .../social/AbstractOAuth2Provider.java | 1 - .../keycloak/social/utils/ToJsonServlet.java | 1 - .../social/twitter/TwitterProvider.java | 1 - .../DummyUserFederationProviderFactory.java | 2 - .../testutils/LDAPEmbeddedServer.java | 1 - .../org/keycloak/testutils/TotpGenerator.java | 1 - .../org/keycloak/testsuite/AssertEvents.java | 2 - .../org/keycloak/testsuite/DummySocial.java | 3 -- .../org/keycloak/testsuite/OAuthClient.java | 4 -- .../testsuite/account/AccountTest.java | 1 - .../RequiredActionEmailVerificationTest.java | 2 +- .../actions/RequiredActionTotpSetupTest.java | 3 -- .../testsuite/adapter/AdapterTest.java | 6 +-- .../testsuite/admin/AbstractClientTest.java | 7 ---- .../testsuite/admin/OAuthClientTest.java | 1 - .../exportimport/ExportImportTest.java | 22 +++++------ .../FederationProvidersIntegrationTest.java | 11 +++--- .../keycloak/testsuite/forms/LogoutTest.java | 5 +-- .../testsuite/forms/ResetPasswordTest.java | 3 +- .../org/keycloak/testsuite/forms/SSOTest.java | 3 -- .../testsuite/model/AbstractModelTest.java | 5 --- .../testsuite/model/ApplicationModelTest.java | 1 - .../model/AuthenticationManagerTest.java | 2 +- .../keycloak/testsuite/model/ImportTest.java | 2 - .../model/UserSessionProviderTest.java | 8 +--- .../testsuite/oauth/AccessTokenTest.java | 10 +---- .../oauth/AuthorizationCodeTest.java | 2 - .../testsuite/oauth/RefreshTokenTest.java | 8 +--- .../pages/AccountUpdateProfilePage.java | 1 - .../testsuite/perf/AccessTokenPerfTest.java | 14 ------- .../testsuite/rule/AbstractKeycloakRule.java | 1 - .../performance/web/KeycloakPerfServer.java | 7 ++-- .../web/KeycloakToolsApplication.java | 13 +++---- .../performance/web/OAuthClient.java | 22 ++++------- .../performance/web/PerfAppServlet.java | 21 +++++----- .../org/keycloak/test/tools/PerfTools.java | 1 - .../test/tools/jobs/CreateUsersJob.java | 2 - .../test/tools/jobs/DeleteUsersJob.java | 10 ++--- .../test/tools/jobs/UpdateUsersJob.java | 10 ++--- .../keycloak/test/tools/jobs/UsersJob.java | 14 +++---- 204 files changed, 423 insertions(+), 668 deletions(-) mode change 100644 => 100755 audit/mongo/src/main/java/org/keycloak/audit/mongo/MongoEventQuery.java mode change 100644 => 100755 connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java mode change 100644 => 100755 core/src/main/java/org/keycloak/util/StringPropertyReplacer.java mode change 100644 => 100755 examples/demo-template/customer-app-cli/src/main/java/org/keycloak/example/CustomerCli.java mode change 100644 => 100755 export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportProvider.java mode change 100644 => 100755 export-import/export-import-api/src/main/java/org/keycloak/exportimport/ImportProvider.java mode change 100644 => 100755 export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportJob.java mode change 100644 => 100755 export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportUtils.java mode change 100644 => 100755 export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java mode change 100644 => 100755 export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProvider.java mode change 100644 => 100755 export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java mode change 100644 => 100755 export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java mode change 100644 => 100755 export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProvider.java mode change 100644 => 100755 export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java mode change 100644 => 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java mode change 100644 => 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java mode change 100644 => 100755 export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java mode change 100644 => 100755 forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java mode change 100644 => 100755 forms/common-freemarker/src/main/java/org/keycloak/freemarker/FreeMarkerUtil.java mode change 100644 => 100755 forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProvider.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationsResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientsResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleMappingResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleScopeResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RolesResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UsersResource.java mode change 100644 => 100755 integration/admin-client/src/main/java/org/keycloak/admin/client/token/TokenService.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialDefinition.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java mode change 100644 => 100755 integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java mode change 100644 => 100755 integration/wildfly-subsystem/src/test/java/org/keycloak/subsystem/extension/SubsystemParsingTestCase.java mode change 100644 => 100755 model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoClientSessionEntity.java mode change 100644 => 100755 picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/idm/KeycloakEventBridge.java mode change 100644 => 100755 picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/PartitionManagerRegistry.java mode change 100644 => 100755 services/src/main/java/org/keycloak/services/managers/AuditManager.java mode change 100644 => 100755 social/core/src/main/java/org/keycloak/social/AbstractOAuth2Provider.java mode change 100644 => 100755 social/core/src/main/test/java/org/keycloak/social/utils/ToJsonServlet.java mode change 100644 => 100755 testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AbstractClientTest.java mode change 100644 => 100755 testsuite/integration/src/test/java/org/keycloak/testsuite/admin/OAuthClientTest.java mode change 100644 => 100755 testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakPerfServer.java mode change 100644 => 100755 testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakToolsApplication.java mode change 100644 => 100755 testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java mode change 100644 => 100755 testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/PerfAppServlet.java diff --git a/audit/email/src/main/java/org/keycloak/audit/email/EmailAuditListener.java b/audit/email/src/main/java/org/keycloak/audit/email/EmailAuditListener.java index 6f50c4e778..67a6eeb511 100755 --- a/audit/email/src/main/java/org/keycloak/audit/email/EmailAuditListener.java +++ b/audit/email/src/main/java/org/keycloak/audit/email/EmailAuditListener.java @@ -7,8 +7,8 @@ import org.keycloak.audit.EventType; import org.keycloak.email.EmailException; import org.keycloak.email.EmailProvider; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.UserModel; import java.util.Set; diff --git a/audit/mongo/src/main/java/org/keycloak/audit/mongo/MongoEventQuery.java b/audit/mongo/src/main/java/org/keycloak/audit/mongo/MongoEventQuery.java old mode 100644 new mode 100755 index 668c90714f..32fc924802 --- a/audit/mongo/src/main/java/org/keycloak/audit/mongo/MongoEventQuery.java +++ b/audit/mongo/src/main/java/org/keycloak/audit/mongo/MongoEventQuery.java @@ -9,7 +9,6 @@ import org.keycloak.audit.EventType; import java.util.LinkedList; import java.util.List; -import java.util.Set; /** * @author Stian Thorgersen diff --git a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java old mode 100644 new mode 100755 index a080f82919..4bd1d6ee09 --- a/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java +++ b/connections/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java @@ -9,7 +9,6 @@ import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import java.util.HashMap; import java.util.Map; -import java.util.Properties; /** * @author Stian Thorgersen diff --git a/core/src/main/java/org/keycloak/representations/idm/UserFederationProviderFactoryRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/UserFederationProviderFactoryRepresentation.java index d13d16a6b4..c08bca3a56 100755 --- a/core/src/main/java/org/keycloak/representations/idm/UserFederationProviderFactoryRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/idm/UserFederationProviderFactoryRepresentation.java @@ -1,7 +1,5 @@ package org.keycloak.representations.idm; -import java.util.List; -import java.util.Map; import java.util.Set; /** diff --git a/core/src/main/java/org/keycloak/util/StringPropertyReplacer.java b/core/src/main/java/org/keycloak/util/StringPropertyReplacer.java old mode 100644 new mode 100755 index d46f69900f..14c90459fa --- a/core/src/main/java/org/keycloak/util/StringPropertyReplacer.java +++ b/core/src/main/java/org/keycloak/util/StringPropertyReplacer.java @@ -21,8 +21,8 @@ */ package org.keycloak.util; -import java.util.Properties; import java.io.File; +import java.util.Properties; /** * A utility class for replacing properties in strings. diff --git a/distribution/modules/lib.xml b/distribution/modules/lib.xml index 39bb7c238f..6e2f849367 100755 --- a/distribution/modules/lib.xml +++ b/distribution/modules/lib.xml @@ -20,7 +20,7 @@ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. --> - + diff --git a/examples/demo-template/admin-access-app/src/main/webapp/admin/admin.jsp b/examples/demo-template/admin-access-app/src/main/webapp/admin/admin.jsp index 7f478b41e4..4ca66af279 100755 --- a/examples/demo-template/admin-access-app/src/main/webapp/admin/admin.jsp +++ b/examples/demo-template/admin-access-app/src/main/webapp/admin/admin.jsp @@ -1,6 +1,6 @@ -<%@ page import="org.keycloak.representations.idm.RoleRepresentation" %> <%@ page import="org.keycloak.example.AdminClient" %> <%@ page import="org.keycloak.representations.AccessTokenResponse" %> +<%@ page import="org.keycloak.representations.idm.RoleRepresentation" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> diff --git a/examples/demo-template/customer-app-cli/src/main/java/org/keycloak/example/CustomerCli.java b/examples/demo-template/customer-app-cli/src/main/java/org/keycloak/example/CustomerCli.java old mode 100644 new mode 100755 index a40df4c6c4..d3c75f5e53 --- a/examples/demo-template/customer-app-cli/src/main/java/org/keycloak/example/CustomerCli.java +++ b/examples/demo-template/customer-app-cli/src/main/java/org/keycloak/example/CustomerCli.java @@ -13,7 +13,6 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.util.Date; import java.util.concurrent.TimeUnit; /** diff --git a/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java b/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java index 91b7422f63..0e14f29482 100755 --- a/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java +++ b/examples/demo-template/customer-app/src/main/java/org/keycloak/example/AdminClient.java @@ -6,7 +6,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.keycloak.KeycloakSecurityContext; import org.keycloak.adapters.HttpClientBuilder; -import org.keycloak.representations.IDToken; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.util.JsonSerialization; diff --git a/examples/demo-template/customer-app/src/main/webapp/admin/admin.jsp b/examples/demo-template/customer-app/src/main/webapp/admin/admin.jsp index fa80b0b763..ee9c7a6f78 100755 --- a/examples/demo-template/customer-app/src/main/webapp/admin/admin.jsp +++ b/examples/demo-template/customer-app/src/main/webapp/admin/admin.jsp @@ -1,5 +1,5 @@ -<%@ page import="org.keycloak.representations.idm.RoleRepresentation" %> <%@ page import="org.keycloak.example.AdminClient" %> +<%@ page import="org.keycloak.representations.idm.RoleRepresentation" %> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> diff --git a/examples/demo-template/customer-app/src/main/webapp/customers/view.jsp b/examples/demo-template/customer-app/src/main/webapp/customers/view.jsp index 799f63de4b..2dd46243a8 100755 --- a/examples/demo-template/customer-app/src/main/webapp/customers/view.jsp +++ b/examples/demo-template/customer-app/src/main/webapp/customers/view.jsp @@ -1,9 +1,9 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> -<%@ page import="org.keycloak.example.CustomerDatabaseClient" %> -<%@ page import="org.keycloak.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.representations.IDToken" %> <%@ page import="org.keycloak.ServiceUrlConstants" %> +<%@ page import="org.keycloak.example.CustomerDatabaseClient" %> +<%@ page import="org.keycloak.representations.IDToken" %> +<%@ page import="org.keycloak.util.KeycloakUriBuilder" %> Customer View Page diff --git a/examples/demo-template/product-app/src/main/webapp/products/servlet-logout.jsp b/examples/demo-template/product-app/src/main/webapp/products/servlet-logout.jsp index 0813b275ec..1a9eb42044 100755 --- a/examples/demo-template/product-app/src/main/webapp/products/servlet-logout.jsp +++ b/examples/demo-template/product-app/src/main/webapp/products/servlet-logout.jsp @@ -1,15 +1,12 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> -<%@ page import="org.keycloak.example.oauth.ProductDatabaseClient" %> -<%@ page import="org.keycloak.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.ServiceUrlConstants" %> Servlet Logout Performs a servlet logout - <% +<% request.logout(); %> diff --git a/examples/demo-template/product-app/src/main/webapp/products/view.jsp b/examples/demo-template/product-app/src/main/webapp/products/view.jsp index e7c1a30c16..81d94c1942 100755 --- a/examples/demo-template/product-app/src/main/webapp/products/view.jsp +++ b/examples/demo-template/product-app/src/main/webapp/products/view.jsp @@ -1,8 +1,8 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ page import="org.keycloak.ServiceUrlConstants" %> <%@ page import="org.keycloak.example.oauth.ProductDatabaseClient" %> <%@ page import="org.keycloak.util.KeycloakUriBuilder" %> -<%@ page import="org.keycloak.ServiceUrlConstants" %> Product View Page diff --git a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/AppContextListener.java b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/AppContextListener.java index 32af874a2c..1fe4a2ff71 100755 --- a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/AppContextListener.java +++ b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/AppContextListener.java @@ -1,18 +1,17 @@ package org.keycloak.example.oauth; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; +import org.jboss.logging.Logger; +import org.keycloak.servlet.ServletOAuthClient; +import org.keycloak.servlet.ServletOAuthClientBuilder; import javax.inject.Inject; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; - -import org.jboss.logging.Logger; -import org.keycloak.servlet.ServletOAuthClient; -import org.keycloak.servlet.ServletOAuthClientBuilder; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; /** * @author Marek Posolda diff --git a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/CDIResourcesProducer.java b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/CDIResourcesProducer.java index fd5e45843e..41e0121788 100755 --- a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/CDIResourcesProducer.java +++ b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/CDIResourcesProducer.java @@ -1,5 +1,7 @@ package org.keycloak.example.oauth; +import org.keycloak.servlet.ServletOAuthClient; + import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.RequestScoped; import javax.enterprise.inject.Produces; @@ -7,8 +9,6 @@ import javax.faces.context.FacesContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.keycloak.servlet.ServletOAuthClient; - /** * @author Marek Posolda */ diff --git a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/RefreshTokenFilter.java b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/RefreshTokenFilter.java index ac85da24f0..590b5dfcf8 100755 --- a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/RefreshTokenFilter.java +++ b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/RefreshTokenFilter.java @@ -1,7 +1,8 @@ package org.keycloak.example.oauth; -import java.io.IOException; -import java.util.Map; +import org.keycloak.OAuth2Constants; +import org.keycloak.adapters.ServerRequest; +import org.keycloak.servlet.ServletOAuthClient; import javax.inject.Inject; import javax.servlet.Filter; @@ -13,10 +14,8 @@ import javax.servlet.ServletResponse; import javax.servlet.annotation.WebFilter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - -import org.keycloak.OAuth2Constants; -import org.keycloak.adapters.ServerRequest; -import org.keycloak.servlet.ServletOAuthClient; +import java.io.IOException; +import java.util.Map; /** * @author Marek Posolda diff --git a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/ServletRequestQualifier.java b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/ServletRequestQualifier.java index 5f7edca722..ceccfbf485 100755 --- a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/ServletRequestQualifier.java +++ b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/ServletRequestQualifier.java @@ -1,12 +1,11 @@ package org.keycloak.example.oauth; +import javax.inject.Qualifier; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import javax.inject.Qualifier; - /** * This is needed to have same code working in AS7 and Wildfly. In Wildfly is HttpServletRequest injected automatically, in AS7 it's not * diff --git a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/UserData.java b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/UserData.java index 6571b18f3a..5161cab9d3 100755 --- a/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/UserData.java +++ b/examples/demo-template/third-party-cdi/src/main/java/org/keycloak/example/oauth/UserData.java @@ -1,10 +1,9 @@ package org.keycloak.example.oauth; -import java.io.Serializable; -import java.util.List; - import javax.enterprise.context.SessionScoped; import javax.inject.Named; +import java.io.Serializable; +import java.util.List; /** * @author Marek Posolda diff --git a/examples/demo-template/third-party-cdi/src/main/webapp/WEB-INF/faces-config.xml b/examples/demo-template/third-party-cdi/src/main/webapp/WEB-INF/faces-config.xml index 10787a09a9..c095fbb79d 100755 --- a/examples/demo-template/third-party-cdi/src/main/webapp/WEB-INF/faces-config.xml +++ b/examples/demo-template/third-party-cdi/src/main/webapp/WEB-INF/faces-config.xml @@ -17,7 +17,7 @@ limitations under the License. --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> \ No newline at end of file diff --git a/examples/demo-template/third-party-cdi/src/main/webapp/client.xhtml b/examples/demo-template/third-party-cdi/src/main/webapp/client.xhtml index 7c4a8dd7c2..4eb592c831 100755 --- a/examples/demo-template/third-party-cdi/src/main/webapp/client.xhtml +++ b/examples/demo-template/third-party-cdi/src/main/webapp/client.xhtml @@ -1,8 +1,9 @@ - +

Third Party App That Pulls Data Using OAuth

diff --git a/examples/demo-template/third-party/src/main/java/org/keycloak/example/oauth/Bootstrap.java b/examples/demo-template/third-party/src/main/java/org/keycloak/example/oauth/Bootstrap.java index 218d1cf28c..a3972b3c21 100755 --- a/examples/demo-template/third-party/src/main/java/org/keycloak/example/oauth/Bootstrap.java +++ b/examples/demo-template/third-party/src/main/java/org/keycloak/example/oauth/Bootstrap.java @@ -6,11 +6,9 @@ import org.keycloak.servlet.ServletOAuthClientBuilder; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; -import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; -import java.security.KeyStore; /** * Init code to load up the truststore so we can make appropriate SSL connections diff --git a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationFactory.java b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationFactory.java index 3144c33325..f079e8c08d 100755 --- a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationFactory.java +++ b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationFactory.java @@ -1,19 +1,10 @@ package org.keycloak.examples.federation.properties; -import org.jboss.logging.Logger; -import org.keycloak.Config; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.UserFederationProvider; -import org.keycloak.models.UserFederationProviderFactory; import org.keycloak.models.UserFederationProviderModel; -import java.io.IOException; import java.io.InputStream; -import java.util.HashSet; -import java.util.List; import java.util.Properties; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; /** * @author Bill Burke diff --git a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationProvider.java b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationProvider.java index 5f52fcafa0..46081f8278 100755 --- a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationProvider.java +++ b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/ClasspathPropertiesFederationProvider.java @@ -2,19 +2,10 @@ package org.keycloak.examples.federation.properties; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.models.RoleModel; -import org.keycloak.models.UserCredentialModel; -import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; import java.util.Properties; -import java.util.Set; /** * @author Bill Burke diff --git a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/FilePropertiesFederationProvider.java b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/FilePropertiesFederationProvider.java index 725daee20c..aa2455310d 100755 --- a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/FilePropertiesFederationProvider.java +++ b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/FilePropertiesFederationProvider.java @@ -2,21 +2,12 @@ package org.keycloak.examples.federation.properties; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.models.RoleModel; -import org.keycloak.models.UserCredentialModel; -import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import java.io.FileOutputStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; import java.util.Properties; -import java.util.Set; /** * @author Bill Burke diff --git a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/WritableUserModelProxy.java b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/WritableUserModelProxy.java index a2b4886f9b..e47d5f21d5 100755 --- a/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/WritableUserModelProxy.java +++ b/examples/providers/federation-provider/src/main/java/org/keycloak/examples/federation/properties/WritableUserModelProxy.java @@ -5,8 +5,6 @@ import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.UserModelDelegate; -import java.io.FileOutputStream; -import java.io.IOException; import java.util.Properties; /** diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportProvider.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportProvider.java old mode 100644 new mode 100755 index 1a0d6a0057..76e1ee94a5 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportProvider.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ExportProvider.java @@ -1,11 +1,10 @@ package org.keycloak.exportimport; -import java.io.IOException; - -import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.provider.Provider; +import java.io.IOException; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ImportProvider.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ImportProvider.java old mode 100644 new mode 100755 index 9134516d78..56bc812464 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ImportProvider.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/ImportProvider.java @@ -1,11 +1,10 @@ package org.keycloak.exportimport; -import java.io.IOException; - -import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.provider.Provider; +import java.io.IOException; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportJob.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportJob.java old mode 100644 new mode 100755 index 748fe1ff2e..6b987996d2 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportJob.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportJob.java @@ -1,9 +1,9 @@ package org.keycloak.exportimport.util; -import java.io.IOException; - import org.keycloak.models.KeycloakSession; +import java.io.IOException; + /** * Task to be executed inside transaction * diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportUtils.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportUtils.java old mode 100644 new mode 100755 index b73a4c0e91..506124af49 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportUtils.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportImportUtils.java @@ -1,13 +1,12 @@ package org.keycloak.exportimport.util; -import java.io.IOException; - -import org.jboss.logging.Logger; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakTransaction; import org.keycloak.models.RealmModel; +import java.io.IOException; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java index e6b71ba7f0..a537fd7ab1 100755 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ExportUtils.java @@ -1,16 +1,5 @@ package org.keycloak.exportimport.util; -import java.io.IOException; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - import net.iharder.Base64; import org.codehaus.jackson.JsonEncoding; import org.codehaus.jackson.JsonFactory; @@ -39,6 +28,17 @@ import org.keycloak.representations.idm.ScopeMappingRepresentation; import org.keycloak.representations.idm.SocialLinkRepresentation; import org.keycloak.representations.idm.UserRepresentation; +import java.io.IOException; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java index 755c34f6c0..aa4d83dcf2 100755 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/ImportUtils.java @@ -1,11 +1,5 @@ package org.keycloak.exportimport.util; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - import org.codehaus.jackson.JsonFactory; import org.codehaus.jackson.JsonParser; import org.codehaus.jackson.JsonToken; @@ -16,14 +10,20 @@ import org.keycloak.exportimport.Strategy; import org.keycloak.models.AdminRoles; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.UserRepresentation; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/MultipleStepsExportProvider.java b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/MultipleStepsExportProvider.java index 9395ceb5a9..5899757c6b 100755 --- a/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/MultipleStepsExportProvider.java +++ b/export-import/export-import-api/src/main/java/org/keycloak/exportimport/util/MultipleStepsExportProvider.java @@ -1,8 +1,5 @@ package org.keycloak.exportimport.util; -import java.io.IOException; -import java.util.List; - import org.jboss.logging.Logger; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; @@ -13,6 +10,9 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.RealmRepresentation; +import java.io.IOException; +import java.util.List; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProvider.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProvider.java index 469507fa24..ea6b7e1916 100755 --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProvider.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProvider.java @@ -1,10 +1,5 @@ package org.keycloak.exportimport.dir; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.List; - import org.keycloak.exportimport.util.ExportUtils; import org.keycloak.exportimport.util.MultipleStepsExportProvider; import org.keycloak.models.KeycloakSession; @@ -13,6 +8,11 @@ import org.keycloak.models.UserModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java old mode 100644 new mode 100755 index 74e7eb43c7..44bed4b82d --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirExportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.dir; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProvider.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProvider.java old mode 100644 new mode 100755 index 1c9f484845..4c532f05b4 --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProvider.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProvider.java @@ -1,12 +1,5 @@ package org.keycloak.exportimport.dir; -import java.io.File; -import java.io.FileInputStream; -import java.io.FilenameFilter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - import org.jboss.logging.Logger; import org.keycloak.Config; import org.keycloak.exportimport.ImportProvider; @@ -19,6 +12,13 @@ import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.File; +import java.io.FileInputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java old mode 100644 new mode 100755 index 3e39a77850..6bea93ef3d --- a/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java +++ b/export-import/export-import-dir/src/main/java/org/keycloak/exportimport/dir/DirImportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.dir; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProvider.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProvider.java index a27f086de6..17cec51798 100755 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProvider.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProvider.java @@ -1,11 +1,5 @@ package org.keycloak.exportimport.singlefile; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - import org.codehaus.jackson.map.ObjectMapper; import org.jboss.logging.Logger; import org.keycloak.exportimport.ExportProvider; @@ -18,6 +12,12 @@ import org.keycloak.models.RealmModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java old mode 100644 new mode 100755 index 614c3bacab..6cef5cc4a5 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileExportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.singlefile; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProvider.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProvider.java old mode 100644 new mode 100755 index 07e8cb21f4..6fbe1c8a36 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProvider.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProvider.java @@ -1,24 +1,19 @@ package org.keycloak.exportimport.singlefile; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - import org.jboss.logging.Logger; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.Strategy; import org.keycloak.exportimport.util.ExportImportJob; import org.keycloak.exportimport.util.ExportImportUtils; -import org.keycloak.exportimport.util.ExportUtils; import org.keycloak.exportimport.util.ImportUtils; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.RealmModel; -import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java old mode 100644 new mode 100755 index 6e3e73261d..77be794509 --- a/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java +++ b/export-import/export-import-single-file/src/main/java/org/keycloak/exportimport/singlefile/SingleFileImportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.singlefile; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java index e60c7eef56..e9196e6912 100755 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProvider.java @@ -1,11 +1,5 @@ package org.keycloak.exportimport.zip; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.util.List; - import de.idyl.winzipaes.AesZipFileEncrypter; import de.idyl.winzipaes.impl.AESEncrypter; import de.idyl.winzipaes.impl.AESEncrypterBC; @@ -18,6 +12,12 @@ import org.keycloak.models.UserModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.List; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java old mode 100644 new mode 100755 index 03f014760e..b8af4b1761 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipExportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.zip; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java old mode 100644 new mode 100755 index 50651794cc..d9a93ee49d --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProvider.java @@ -1,13 +1,5 @@ package org.keycloak.exportimport.zip; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.DataFormatException; - import de.idyl.winzipaes.AesZipFileDecrypter; import de.idyl.winzipaes.impl.AESDecrypter; import de.idyl.winzipaes.impl.AESDecrypterBC; @@ -24,6 +16,14 @@ import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.util.JsonSerialization; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.zip.DataFormatException; + /** * @author Marek Posolda */ diff --git a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java old mode 100644 new mode 100755 index 9127a8bcb9..8589fb4824 --- a/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java +++ b/export-import/export-import-zip/src/main/java/org/keycloak/exportimport/zip/ZipImportProviderFactory.java @@ -1,13 +1,13 @@ package org.keycloak.exportimport.zip; -import java.io.File; - import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ImportProvider; import org.keycloak.exportimport.ImportProviderFactory; import org.keycloak.models.KeycloakSession; +import java.io.File; + /** * @author Marek Posolda */ diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProvider.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProvider.java index c364f0265c..fed574b1e6 100755 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProvider.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProvider.java @@ -1,22 +1,18 @@ package org.keycloak.federation.ldap; import org.jboss.logging.Logger; -import org.keycloak.models.UserCredentialValueModel; -import org.keycloak.models.UserFederationProvider; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ModelException; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserCredentialModel; +import org.keycloak.models.UserCredentialValueModel; +import org.keycloak.models.UserFederationProvider; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import org.picketlink.idm.IdentityManagementException; import org.picketlink.idm.IdentityManager; import org.picketlink.idm.PartitionManager; -import org.picketlink.idm.credential.Credentials; -import org.picketlink.idm.credential.Password; -import org.picketlink.idm.credential.UsernamePasswordCredentials; -import org.picketlink.idm.model.Attribute; import org.picketlink.idm.model.basic.BasicModel; import org.picketlink.idm.model.basic.User; import org.picketlink.idm.query.IdentityQuery; diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java index ad6d18508e..53aeb0ca17 100755 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/LDAPFederationProviderFactory.java @@ -1,10 +1,10 @@ package org.keycloak.federation.ldap; import org.keycloak.Config; +import org.keycloak.models.KeycloakSession; import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderFactory; import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.models.KeycloakSession; import org.keycloak.picketlink.PartitionManagerProvider; import org.picketlink.idm.PartitionManager; diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/ReadonlyLDAPUserModelDelegate.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/ReadonlyLDAPUserModelDelegate.java index 30dca4c002..8177e63a12 100755 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/ReadonlyLDAPUserModelDelegate.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/ReadonlyLDAPUserModelDelegate.java @@ -1,16 +1,9 @@ package org.keycloak.federation.ldap; import org.jboss.logging.Logger; -import org.keycloak.models.ModelException; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.UserModelDelegate; -import org.picketlink.idm.IdentityManagementException; -import org.picketlink.idm.IdentityManager; -import org.picketlink.idm.credential.Password; -import org.picketlink.idm.credential.TOTPCredential; -import org.picketlink.idm.model.basic.BasicModel; -import org.picketlink.idm.model.basic.User; /** * @author Bill Burke diff --git a/federation/ldap/src/main/java/org/keycloak/federation/ldap/UnsyncedLDAPUserModelDelegate.java b/federation/ldap/src/main/java/org/keycloak/federation/ldap/UnsyncedLDAPUserModelDelegate.java index 043f8d7683..7c2cfb8130 100755 --- a/federation/ldap/src/main/java/org/keycloak/federation/ldap/UnsyncedLDAPUserModelDelegate.java +++ b/federation/ldap/src/main/java/org/keycloak/federation/ldap/UnsyncedLDAPUserModelDelegate.java @@ -1,16 +1,8 @@ package org.keycloak.federation.ldap; import org.jboss.logging.Logger; -import org.keycloak.models.ModelException; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.UserModelDelegate; -import org.picketlink.idm.IdentityManagementException; -import org.picketlink.idm.IdentityManager; -import org.picketlink.idm.credential.Password; -import org.picketlink.idm.credential.TOTPCredential; -import org.picketlink.idm.model.basic.BasicModel; -import org.picketlink.idm.model.basic.User; /** * @author Bill Burke diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountSocialBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountSocialBean.java index 51d71c9ca0..af845d1078 100755 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountSocialBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountSocialBean.java @@ -1,13 +1,5 @@ package org.keycloak.account.freemarker.model; -import java.net.URI; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.ws.rs.core.UriBuilder; - import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.SocialLinkModel; @@ -16,6 +8,13 @@ import org.keycloak.services.resources.flows.Urls; import org.keycloak.social.SocialLoader; import org.keycloak.social.SocialProvider; +import javax.ws.rs.core.UriBuilder; +import java.net.URI; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * @author Marek Posolda */ diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java index bf5148d38f..75c9fea725 100755 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java @@ -28,7 +28,6 @@ import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URLEncoder; import java.security.SecureRandom; -import java.util.Random; /** diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java old mode 100644 new mode 100755 index fce032fc0b..8a74b9bed6 --- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java +++ b/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java @@ -2,7 +2,6 @@ package org.keycloak.account.freemarker.model; import org.keycloak.freemarker.Theme; import org.keycloak.models.RealmModel; -import org.keycloak.services.resources.TokenService; import org.keycloak.services.resources.flows.Urls; import java.net.URI; diff --git a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/FreeMarkerUtil.java b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/FreeMarkerUtil.java old mode 100644 new mode 100755 index 5d71fb39be..8f2dc0e534 --- a/forms/common-freemarker/src/main/java/org/keycloak/freemarker/FreeMarkerUtil.java +++ b/forms/common-freemarker/src/main/java/org/keycloak/freemarker/FreeMarkerUtil.java @@ -9,9 +9,6 @@ import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.net.URL; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** diff --git a/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProvider.java b/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProvider.java old mode 100644 new mode 100755 index 693961f964..b8c7c89840 --- a/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProvider.java +++ b/forms/common-themes/src/main/java/org/keycloak/theme/FolderThemeProvider.java @@ -2,7 +2,6 @@ package org.keycloak.theme; import org.keycloak.freemarker.Theme; import org.keycloak.freemarker.ThemeProvider; -import org.keycloak.Config; import java.io.File; import java.io.FileFilter; diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java index a5551b064b..f358d3df00 100755 --- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java +++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/OAuthGrantBean.java @@ -24,10 +24,8 @@ package org.keycloak.login.freemarker.model; import org.keycloak.models.ClaimMask; import org.keycloak.models.ClientModel; import org.keycloak.models.RoleModel; -import org.keycloak.models.UserModel; import javax.ws.rs.core.MultivaluedMap; -import java.util.ArrayList; import java.util.LinkedList; import java.util.List; diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/UrlBean.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/UrlBean.java index 38e7863042..bb8df0ec2e 100755 --- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/UrlBean.java +++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/model/UrlBean.java @@ -23,7 +23,6 @@ package org.keycloak.login.freemarker.model; import org.keycloak.freemarker.Theme; import org.keycloak.models.RealmModel; -import org.keycloak.services.resources.TokenService; import org.keycloak.services.resources.flows.Urls; import java.net.URI; diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakAccount.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakAccount.java index 4bc9dd4d09..21543ca8e6 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakAccount.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakAccount.java @@ -1,9 +1,6 @@ package org.keycloak.adapters; import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.adapters.RefreshableKeycloakSecurityContext; -import org.keycloak.representations.AccessToken; import java.security.Principal; import java.util.Set; diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeployment.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeployment.java index 645c859a87..1d586d110b 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeployment.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeployment.java @@ -2,7 +2,6 @@ package org.keycloak.adapters; import org.apache.http.client.HttpClient; import org.jboss.logging.Logger; -import org.keycloak.OAuth2Constants; import org.keycloak.ServiceUrlConstants; import org.keycloak.enums.SslRequired; import org.keycloak.util.KeycloakUriBuilder; diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java index 61cf482da4..963519bc42 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/KeycloakDeploymentBuilder.java @@ -2,11 +2,8 @@ package org.keycloak.adapters; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.annotate.JsonSerialize; -import org.keycloak.OAuth2Constants; -import org.keycloak.ServiceUrlConstants; import org.keycloak.enums.SslRequired; import org.keycloak.representations.adapters.config.AdapterConfig; -import org.keycloak.util.KeycloakUriBuilder; import org.keycloak.util.PemUtils; import java.io.IOException; diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/RefreshableKeycloakSecurityContext.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/RefreshableKeycloakSecurityContext.java index 5f4325ab40..bd68fb5bd1 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/RefreshableKeycloakSecurityContext.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/RefreshableKeycloakSecurityContext.java @@ -1,11 +1,11 @@ package org.keycloak.adapters; +import org.jboss.logging.Logger; import org.keycloak.KeycloakSecurityContext; import org.keycloak.RSATokenVerifier; import org.keycloak.VerificationException; import org.keycloak.representations.AccessToken; import org.keycloak.representations.AccessTokenResponse; -import org.jboss.logging.Logger; import org.keycloak.representations.IDToken; import java.io.IOException; diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/ServerRequest.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/ServerRequest.java index ed8e91f75a..985495028d 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/ServerRequest.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/ServerRequest.java @@ -5,7 +5,6 @@ import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.message.BasicNameValuePair; import org.keycloak.OAuth2Constants; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java old mode 100644 new mode 100755 index 7f1037403d..1c6e003d4b --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/Keycloak.java @@ -4,7 +4,6 @@ import org.jboss.resteasy.client.jaxrs.ResteasyClient; import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; import org.keycloak.admin.client.resource.BearerAuthFilter; -import org.keycloak.admin.client.resource.KeycloakAdminFactory; import org.keycloak.admin.client.resource.RealmResource; import org.keycloak.admin.client.resource.RealmsResource; import org.keycloak.admin.client.token.TokenManager; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationResource.java old mode 100644 new mode 100755 index cca4442361..510ce75298 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationResource.java @@ -4,7 +4,14 @@ import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ClaimRepresentation; import org.keycloak.representations.idm.CredentialRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.Set; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationsResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationsResource.java old mode 100644 new mode 100755 index 8fd48006ad..6ccbdd8643 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationsResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/ApplicationsResource.java @@ -2,7 +2,12 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.ApplicationRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientResource.java old mode 100644 new mode 100755 index ceeddb2222..5d08748fbd --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientResource.java @@ -4,7 +4,13 @@ import org.keycloak.representations.idm.ClaimRepresentation; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.representations.idm.OAuthClientRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; /** diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientsResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientsResource.java old mode 100644 new mode 100755 index 68e3f810ee..027c82923c --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientsResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/OAuthClientsResource.java @@ -2,7 +2,12 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.OAuthClientRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleMappingResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleMappingResource.java old mode 100644 new mode 100755 index 7d01d9f7e0..65ffe049ab --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleMappingResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleMappingResource.java @@ -2,7 +2,11 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.MappingsRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; /** diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleResource.java old mode 100644 new mode 100755 index 84a292fbc4..3cc5e7a97a --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleResource.java @@ -2,7 +2,14 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.RoleRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; import java.util.Set; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleScopeResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleScopeResource.java old mode 100644 new mode 100755 index 21a4645167..96ff7a7990 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleScopeResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RoleScopeResource.java @@ -2,7 +2,12 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.RoleRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RolesResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RolesResource.java old mode 100644 new mode 100755 index 6d705f5b9d..f7a0af1fcd --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RolesResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/RolesResource.java @@ -2,7 +2,12 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.RoleRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java old mode 100644 new mode 100755 index ce5dde2aef..70cf066ddc --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UserResource.java @@ -6,7 +6,13 @@ import org.keycloak.representations.idm.SocialLinkRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.representations.idm.UserSessionRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import java.util.List; import java.util.Map; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UsersResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UsersResource.java old mode 100644 new mode 100755 index 640a900e72..a1d5552121 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UsersResource.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/UsersResource.java @@ -2,7 +2,13 @@ package org.keycloak.admin.client.resource; import org.keycloak.representations.idm.UserRepresentation; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import java.util.List; diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/token/TokenService.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/token/TokenService.java old mode 100644 new mode 100755 index ff4c8f77db..0d97fc2c19 --- a/integration/admin-client/src/main/java/org/keycloak/admin/client/token/TokenService.java +++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/token/TokenService.java @@ -2,7 +2,11 @@ package org.keycloak.admin.client.token; import org.keycloak.representations.AccessTokenResponse; -import javax.ws.rs.*; +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java index 9b8a28bd5d..a6bb63ec61 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java @@ -17,8 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.List; -import org.jboss.as.controller.AbstractAddStepHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; @@ -26,6 +24,8 @@ import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.dmr.ModelNode; import org.jboss.msc.service.ServiceController; +import java.util.List; + /** * Add a credential to a deployment. * diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java index dbc402e730..170aff9fa2 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java @@ -17,8 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.List; import org.jboss.as.server.deployment.DeploymentPhaseContext; import org.jboss.as.server.deployment.DeploymentUnit; import org.jboss.as.server.deployment.DeploymentUnitProcessingException; @@ -33,6 +31,9 @@ import org.jboss.metadata.web.spec.LoginConfigMetaData; import org.keycloak.adapters.as7.KeycloakAuthenticatorValve; import org.keycloak.subsystem.logging.KeycloakLogger; +import java.util.ArrayList; +import java.util.List; + /** * Pass authentication data (keycloak.json) as a servlet context param so it can be read by the KeycloakServletExtension. * diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java index 7bb610b5f1..232532a23f 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java @@ -16,8 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.List; - import org.jboss.as.controller.AbstractBoottimeAddStepHandler; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; @@ -28,6 +26,8 @@ import org.jboss.as.server.deployment.Phase; import org.jboss.dmr.ModelNode; import org.jboss.msc.service.ServiceController; +import java.util.List; + /** * The Keycloak subsystem add update handler. * diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java index 99b3749345..204618d176 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java @@ -16,22 +16,18 @@ */ package org.keycloak.subsystem.extension; +import org.jboss.as.controller.AttributeDefinition; +import org.jboss.as.controller.PathElement; +import org.jboss.as.controller.SimpleAttributeDefinition; +import org.jboss.as.controller.SimpleResourceDefinition; +import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; +import org.jboss.as.controller.registry.ManagementResourceRegistration; +import org.jboss.as.controller.registry.OperationEntry; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.jboss.as.controller.AttributeDefinition; -import org.jboss.as.controller.PathElement; -import org.jboss.as.controller.SimpleAttributeDefinition; -import org.jboss.as.controller.SimpleAttributeDefinitionBuilder; -import org.jboss.as.controller.SimpleResourceDefinition; -import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; -import org.jboss.as.controller.operations.validation.IntRangeValidator; -import org.jboss.as.controller.operations.validation.StringLengthValidator; -import org.jboss.as.controller.registry.ManagementResourceRegistration; -import org.jboss.as.controller.registry.OperationEntry; -import org.jboss.dmr.ModelNode; -import org.jboss.dmr.ModelType; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE; diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java index f6847b5d5d..1902b076bc 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java @@ -17,13 +17,14 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractWriteAttributeHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.dmr.ModelNode; +import java.util.List; + /** * Update an attribute on a realm. * diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java index c5f795c4e1..b5b518aaad 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java @@ -17,17 +17,18 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractAddStepHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.dmr.ModelNode; +import org.jboss.msc.service.ServiceController; + +import java.util.List; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP; -import org.jboss.msc.service.ServiceController; /** * Add a deployment to a realm. diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java index f00a22c714..c2cb88d618 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java @@ -16,10 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.PathElement; import org.jboss.as.controller.SimpleAttributeDefinition; @@ -32,6 +28,11 @@ import org.jboss.as.controller.registry.OperationEntry; import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE; /** diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java index 8cc1f604d8..2caca6ae64 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java @@ -17,7 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractWriteAttributeHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; @@ -25,6 +24,8 @@ import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.dmr.ModelNode; +import java.util.List; + /** * Update an attribute on a secure-deployment. * diff --git a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java index 8bf2033d6a..65ad2870c9 100755 --- a/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java +++ b/integration/as7-eap-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java @@ -22,8 +22,8 @@ import org.jboss.logging.Logger; import org.jboss.logging.Message; import org.jboss.logging.MessageLogger; -import static org.jboss.logging.Logger.Level.INFO; import static org.jboss.logging.Logger.Level.DEBUG; +import static org.jboss.logging.Logger.Level.INFO; /** * This interface to be fleshed out later when error messages are fully externalized. diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/AuthenticatedActionsValve.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/AuthenticatedActionsValve.java index cef39820fa..b0888eba76 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/AuthenticatedActionsValve.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/AuthenticatedActionsValve.java @@ -1,25 +1,18 @@ package org.keycloak.adapters.as7; import org.apache.catalina.Container; -import org.apache.catalina.Session; import org.apache.catalina.Valve; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.valves.ValveBase; import org.jboss.logging.Logger; -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.AdapterConstants; import org.keycloak.adapters.AdapterDeploymentContext; import org.keycloak.adapters.AuthenticatedActionsHandler; import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.representations.AccessToken; -import org.keycloak.representations.adapters.config.AdapterConfig; import javax.management.ObjectName; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.Set; /** * Pre-installed actions that must be authenticated diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaHttpFacade.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaHttpFacade.java index 05bdd228ac..ce7d27cb84 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaHttpFacade.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaHttpFacade.java @@ -1,7 +1,5 @@ package org.keycloak.adapters.as7; -import org.apache.catalina.connector.Request; -import org.apache.catalina.connector.Response; import org.keycloak.KeycloakSecurityContext; import org.keycloak.adapters.HttpFacade; diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaUserSessionManagement.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaUserSessionManagement.java index ef3c2a1105..c1ac9803fc 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaUserSessionManagement.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CatalinaUserSessionManagement.java @@ -7,10 +7,8 @@ import org.apache.catalina.realm.GenericPrincipal; import org.jboss.logging.Logger; import org.keycloak.adapters.UserSessionManagement; -import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CorsPreflightChecker.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CorsPreflightChecker.java index 20de1bd6e2..bfa0e4be4c 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CorsPreflightChecker.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/CorsPreflightChecker.java @@ -4,7 +4,6 @@ import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.jboss.logging.Logger; import org.keycloak.adapters.KeycloakDeployment; -import org.keycloak.representations.adapters.config.AdapterConfig; import javax.servlet.http.HttpServletResponse; diff --git a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java index 45707b4af7..dc9ef432de 100755 --- a/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java +++ b/integration/as7-eap6/adapter/src/main/java/org/keycloak/adapters/as7/KeycloakAuthenticatorValve.java @@ -22,7 +22,6 @@ import org.keycloak.adapters.KeycloakDeployment; import org.keycloak.adapters.KeycloakDeploymentBuilder; import org.keycloak.adapters.PreAuthActionsHandler; import org.keycloak.adapters.RefreshableKeycloakSecurityContext; -import org.keycloak.adapters.ServerRequest; import javax.servlet.ServletContext; import javax.servlet.ServletException; diff --git a/integration/jaxrs-oauth-client/src/main/java/org/keycloak/jaxrs/JaxrsBearerTokenFilter.java b/integration/jaxrs-oauth-client/src/main/java/org/keycloak/jaxrs/JaxrsBearerTokenFilter.java index 6b1d2d6787..6ba99842a6 100755 --- a/integration/jaxrs-oauth-client/src/main/java/org/keycloak/jaxrs/JaxrsBearerTokenFilter.java +++ b/integration/jaxrs-oauth-client/src/main/java/org/keycloak/jaxrs/JaxrsBearerTokenFilter.java @@ -2,8 +2,8 @@ package org.keycloak.jaxrs; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.ResteasyProviderFactory; -import org.keycloak.KeycloakSecurityContext; import org.keycloak.KeycloakPrincipal; +import org.keycloak.KeycloakSecurityContext; import org.keycloak.RSATokenVerifier; import org.keycloak.VerificationException; import org.keycloak.representations.AccessToken; diff --git a/integration/servlet-oauth-client/src/main/java/org/keycloak/servlet/ServletOAuthClient.java b/integration/servlet-oauth-client/src/main/java/org/keycloak/servlet/ServletOAuthClient.java index 95dbf1efc3..34e80357fe 100755 --- a/integration/servlet-oauth-client/src/main/java/org/keycloak/servlet/ServletOAuthClient.java +++ b/integration/servlet-oauth-client/src/main/java/org/keycloak/servlet/ServletOAuthClient.java @@ -3,7 +3,6 @@ package org.keycloak.servlet; import org.apache.http.client.HttpClient; import org.keycloak.AbstractOAuthClient; import org.keycloak.OAuth2Constants; -import org.keycloak.adapters.HttpClientBuilder; import org.keycloak.adapters.ServerRequest; import org.keycloak.jose.jws.JWSInput; import org.keycloak.representations.AccessTokenResponse; diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/AuthenticatedActionsValve.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/AuthenticatedActionsValve.java index 541fc90ceb..57ccea771c 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/AuthenticatedActionsValve.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/AuthenticatedActionsValve.java @@ -1,11 +1,5 @@ package org.keycloak.adapters.tomcat7; -import java.io.IOException; -import java.util.logging.Logger; - -import javax.management.ObjectName; -import javax.servlet.ServletException; - import org.apache.catalina.Container; import org.apache.catalina.Valve; import org.apache.catalina.connector.Request; @@ -15,6 +9,11 @@ import org.keycloak.adapters.AdapterDeploymentContext; import org.keycloak.adapters.AuthenticatedActionsHandler; import org.keycloak.adapters.KeycloakDeployment; +import javax.management.ObjectName; +import javax.servlet.ServletException; +import java.io.IOException; +import java.util.logging.Logger; + /** * Pre-installed actions that must be authenticated *

diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaHttpFacade.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaHttpFacade.java index 4833557816..691a6c311d 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaHttpFacade.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaHttpFacade.java @@ -1,5 +1,10 @@ package org.keycloak.adapters.tomcat7; +import org.keycloak.KeycloakSecurityContext; +import org.keycloak.adapters.HttpFacade; + +import javax.security.cert.X509Certificate; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -7,12 +12,6 @@ import java.util.ArrayList; import java.util.Enumeration; import java.util.List; -import javax.security.cert.X509Certificate; -import javax.servlet.http.HttpServletResponse; - -import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.HttpFacade; - /** * @author Bill Burke * @version $Revision: 1 $ diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaRequestAuthenticator.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaRequestAuthenticator.java index 27a003dd25..68015ca52e 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaRequestAuthenticator.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaRequestAuthenticator.java @@ -1,11 +1,5 @@ package org.keycloak.adapters.tomcat7; -import java.io.IOException; -import java.security.Principal; -import java.util.Collections; -import java.util.Set; -import java.util.logging.Logger; - import org.apache.catalina.Session; import org.apache.catalina.authenticator.Constants; import org.apache.catalina.connector.Request; @@ -18,6 +12,12 @@ import org.keycloak.adapters.RefreshableKeycloakSecurityContext; import org.keycloak.adapters.RequestAuthenticator; import org.keycloak.representations.AccessToken; +import java.io.IOException; +import java.security.Principal; +import java.util.Collections; +import java.util.Set; +import java.util.logging.Logger; + /** * @author Davide Ungari * @version $Revision: 1 $ diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaSecurityContextHelper.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaSecurityContextHelper.java index b4e9a59c3f..a4dcd4e97a 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaSecurityContextHelper.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaSecurityContextHelper.java @@ -1,5 +1,10 @@ package org.keycloak.adapters.tomcat7; +import org.apache.catalina.Realm; +import org.apache.catalina.realm.GenericPrincipal; +import org.keycloak.KeycloakSecurityContext; + +import javax.security.auth.Subject; import java.security.Principal; import java.security.acl.Group; import java.util.ArrayList; @@ -9,12 +14,6 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import javax.security.auth.Subject; - -import org.apache.catalina.Realm; -import org.apache.catalina.realm.GenericPrincipal; -import org.keycloak.KeycloakSecurityContext; - /** * @author Davide Ungari * @version $Revision: 1 $ diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaUserSessionManagement.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaUserSessionManagement.java index 4ec4b9792a..c21bbb8d09 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaUserSessionManagement.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CatalinaUserSessionManagement.java @@ -1,20 +1,18 @@ package org.keycloak.adapters.tomcat7; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Logger; - import org.apache.catalina.Session; import org.apache.catalina.SessionEvent; import org.apache.catalina.SessionListener; import org.apache.catalina.realm.GenericPrincipal; import org.keycloak.adapters.UserSessionManagement; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Logger; + /** * Manages relationship to users and sessions so that forced admin logout can be implemented * diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CorsPreflightChecker.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CorsPreflightChecker.java index d614872157..7dc3f406ee 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CorsPreflightChecker.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/CorsPreflightChecker.java @@ -1,13 +1,12 @@ package org.keycloak.adapters.tomcat7; -import java.util.logging.Logger; - -import javax.servlet.http.HttpServletResponse; - import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.keycloak.adapters.KeycloakDeployment; +import javax.servlet.http.HttpServletResponse; +import java.util.logging.Logger; + /** * @author Davide Ungari * @version $Revision: 1 $ diff --git a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/KeycloakAuthenticatorValve.java b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/KeycloakAuthenticatorValve.java index 5ce3050d5c..95af3dc884 100755 --- a/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/KeycloakAuthenticatorValve.java +++ b/integration/tomcat7/adapter/src/main/java/org/keycloak/adapters/tomcat7/KeycloakAuthenticatorValve.java @@ -1,16 +1,5 @@ package org.keycloak.adapters.tomcat7; -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.logging.Logger; - -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletResponse; - import org.apache.catalina.Context; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; @@ -32,6 +21,16 @@ import org.keycloak.adapters.KeycloakDeploymentBuilder; import org.keycloak.adapters.PreAuthActionsHandler; import org.keycloak.adapters.RefreshableKeycloakSecurityContext; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletResponse; +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.util.logging.Logger; + /** * Web deployment whose security is managed by a remote OAuth Skeleton Key * authentication server diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/KeycloakServletExtension.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/KeycloakServletExtension.java index 755712747d..9658fd64d9 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/KeycloakServletExtension.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/KeycloakServletExtension.java @@ -27,15 +27,14 @@ import io.undertow.servlet.api.AuthMethodConfig; import io.undertow.servlet.api.DeploymentInfo; import io.undertow.servlet.api.LoginConfig; import io.undertow.servlet.api.ServletSessionConfig; -import java.io.ByteArrayInputStream; import org.jboss.logging.Logger; import org.keycloak.adapters.AdapterConstants; import org.keycloak.adapters.AdapterDeploymentContext; -import org.keycloak.adapters.AuthenticatedActionsHandler; import org.keycloak.adapters.KeycloakDeployment; import org.keycloak.adapters.KeycloakDeploymentBuilder; import javax.servlet.ServletContext; +import java.io.ByteArrayInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletKeycloakAuthMech.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletKeycloakAuthMech.java index 1ccce63c0e..9b2e157725 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletKeycloakAuthMech.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletKeycloakAuthMech.java @@ -20,16 +20,13 @@ import io.undertow.security.api.NotificationReceiver; import io.undertow.security.api.SecurityContext; import io.undertow.security.api.SecurityNotification; import io.undertow.server.HttpServerExchange; -import io.undertow.server.session.Session; import io.undertow.servlet.api.ConfidentialPortManager; import io.undertow.servlet.handlers.ServletRequestContext; -import io.undertow.util.Sessions; import org.jboss.logging.Logger; import org.keycloak.KeycloakSecurityContext; import org.keycloak.adapters.AdapterDeploymentContext; import org.keycloak.adapters.KeycloakDeployment; import org.keycloak.adapters.RequestAuthenticator; -import org.keycloak.adapters.ServerRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletPreAuthActionsHandler.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletPreAuthActionsHandler.java index 0f20afaeb1..d7059f7f86 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletPreAuthActionsHandler.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletPreAuthActionsHandler.java @@ -23,7 +23,6 @@ import io.undertow.servlet.handlers.ServletRequestContext; import org.jboss.logging.Logger; import org.keycloak.adapters.AdapterDeploymentContext; import org.keycloak.adapters.PreAuthActionsHandler; -import org.keycloak.adapters.KeycloakDeployment; /** * @author Bill Burke diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletRequestAuthenticator.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletRequestAuthenticator.java index 6635d34687..cd2fef2990 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletRequestAuthenticator.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/ServletRequestAuthenticator.java @@ -19,15 +19,15 @@ package org.keycloak.adapters.undertow; import io.undertow.security.api.SecurityContext; import io.undertow.server.HttpServerExchange; import io.undertow.servlet.handlers.ServletRequestContext; +import org.keycloak.KeycloakPrincipal; import org.keycloak.KeycloakSecurityContext; import org.keycloak.adapters.HttpFacade; import org.keycloak.adapters.KeycloakAccount; import org.keycloak.adapters.KeycloakDeployment; +import org.keycloak.adapters.RefreshableKeycloakSecurityContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; -import org.keycloak.KeycloakPrincipal; -import org.keycloak.adapters.RefreshableKeycloakSecurityContext; /** * @author Bill Burke diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowHttpFacade.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowHttpFacade.java index b08f5eff9b..973b0c741e 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowHttpFacade.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowHttpFacade.java @@ -17,14 +17,12 @@ package org.keycloak.adapters.undertow; import io.undertow.server.HttpServerExchange; -import io.undertow.server.handlers.Cookie; import io.undertow.server.handlers.CookieImpl; import io.undertow.util.AttachmentKey; import io.undertow.util.Headers; import io.undertow.util.HttpString; import org.jboss.logging.Logger; import org.keycloak.KeycloakSecurityContext; -import org.keycloak.adapters.AuthChallenge; import org.keycloak.adapters.HttpFacade; import org.keycloak.util.KeycloakUriBuilder; diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowKeycloakAuthMech.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowKeycloakAuthMech.java index 8182496002..a67b5e8510 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowKeycloakAuthMech.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowKeycloakAuthMech.java @@ -29,11 +29,6 @@ import org.keycloak.adapters.AdapterDeploymentContext; import org.keycloak.adapters.AuthChallenge; import org.keycloak.adapters.AuthOutcome; import org.keycloak.adapters.RequestAuthenticator; -import org.keycloak.adapters.ServerRequest; - -import java.io.IOException; - -import static org.keycloak.adapters.undertow.ServletKeycloakAuthMech.KEYCLOAK_CHALLENGE_ATTACHMENT_KEY; /** * Abstract base class for a Keycloak-enabled Undertow AuthenticationMechanism. diff --git a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowUserSessionManagement.java b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowUserSessionManagement.java index a70eac42fa..b7112d74f0 100755 --- a/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowUserSessionManagement.java +++ b/integration/undertow/src/main/java/org/keycloak/adapters/undertow/UndertowUserSessionManagement.java @@ -24,10 +24,8 @@ import io.undertow.server.session.SessionManager; import io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler; import org.jboss.logging.Logger; -import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; diff --git a/integration/wildfly-adapter/src/main/java/org/keycloak/adapters/wildfly/WildflyKeycloakServletExtension.java b/integration/wildfly-adapter/src/main/java/org/keycloak/adapters/wildfly/WildflyKeycloakServletExtension.java index 197f192495..60b28b926e 100755 --- a/integration/wildfly-adapter/src/main/java/org/keycloak/adapters/wildfly/WildflyKeycloakServletExtension.java +++ b/integration/wildfly-adapter/src/main/java/org/keycloak/adapters/wildfly/WildflyKeycloakServletExtension.java @@ -3,7 +3,6 @@ package org.keycloak.adapters.wildfly; import io.undertow.servlet.api.DeploymentInfo; import org.jboss.logging.Logger; import org.keycloak.adapters.AdapterDeploymentContext; -import org.keycloak.adapters.KeycloakDeployment; import org.keycloak.adapters.undertow.KeycloakServletExtension; import org.keycloak.adapters.undertow.ServletKeycloakAuthMech; import org.keycloak.adapters.undertow.UndertowUserSessionManagement; diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java old mode 100644 new mode 100755 index ea14dfb4b8..63c78a721c --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialAddHandler.java @@ -17,7 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractAddStepHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; @@ -26,6 +25,8 @@ import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.dmr.ModelNode; import org.jboss.msc.service.ServiceController; +import java.util.List; + /** * Add a credential to a deployment. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialDefinition.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialDefinition.java old mode 100644 new mode 100755 index 9ae3abdfb6..212f8fa51c --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialDefinition.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/CredentialDefinition.java @@ -17,7 +17,6 @@ package org.keycloak.subsystem.extension; import org.jboss.as.controller.AttributeDefinition; -import org.jboss.as.controller.ModelOnlyWriteAttributeHandler; import org.jboss.as.controller.PathElement; import org.jboss.as.controller.SimpleAttributeDefinitionBuilder; import org.jboss.as.controller.SimpleResourceDefinition; diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java index 16872c86ff..000c30da94 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigDeploymentProcessor.java @@ -17,8 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.List; import org.jboss.as.server.deployment.DeploymentPhaseContext; import org.jboss.as.server.deployment.DeploymentUnit; import org.jboss.as.server.deployment.DeploymentUnitProcessingException; @@ -31,6 +29,9 @@ import org.jboss.metadata.web.jboss.JBossWebMetaData; import org.jboss.metadata.web.spec.LoginConfigMetaData; import org.keycloak.subsystem.logging.KeycloakLogger; +import java.util.ArrayList; +import java.util.List; + /** * Pass authentication data (keycloak.json) as a servlet context param so it can be read by the KeycloakServletExtension. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigService.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigService.java index f93b14db4d..eb820fcff8 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigService.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakAdapterConfigService.java @@ -17,8 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.HashMap; -import java.util.Map; import org.jboss.as.controller.OperationContext; import org.jboss.dmr.ModelNode; import org.jboss.dmr.Property; @@ -31,6 +29,9 @@ import org.jboss.msc.service.StartContext; import org.jboss.msc.service.StartException; import org.jboss.msc.service.StopContext; +import java.util.HashMap; +import java.util.Map; + import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADDRESS; /** diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessor.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessor.java index 5dd1e526d6..be86091c20 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessor.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakDependencyProcessor.java @@ -24,11 +24,9 @@ import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.as.server.deployment.DeploymentUnitProcessor; import org.jboss.as.server.deployment.module.ModuleDependency; import org.jboss.as.server.deployment.module.ModuleSpecification; -import org.jboss.logging.Logger; import org.jboss.modules.Module; import org.jboss.modules.ModuleIdentifier; import org.jboss.modules.ModuleLoader; -import org.keycloak.subsystem.logging.KeycloakLogger; /** * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakExtension.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakExtension.java index 79439354ac..32837aa76c 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakExtension.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakExtension.java @@ -19,11 +19,11 @@ package org.keycloak.subsystem.extension; import org.jboss.as.controller.Extension; import org.jboss.as.controller.ExtensionContext; import org.jboss.as.controller.PathElement; +import org.jboss.as.controller.ResourceDefinition; import org.jboss.as.controller.SubsystemRegistration; import org.jboss.as.controller.descriptions.StandardResourceDescriptionResolver; import org.jboss.as.controller.parsing.ExtensionParsingContext; import org.jboss.as.controller.registry.ManagementResourceRegistration; -import org.jboss.as.controller.ResourceDefinition; import org.keycloak.subsystem.logging.KeycloakLogger; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM; diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java old mode 100644 new mode 100755 index 846a7701af..c8f2e1d0df --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemAdd.java @@ -16,8 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.List; - import org.jboss.as.controller.AbstractBoottimeAddStepHandler; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; @@ -28,6 +26,8 @@ import org.jboss.as.server.deployment.Phase; import org.jboss.dmr.ModelNode; import org.jboss.msc.service.ServiceController; +import java.util.List; + /** * The Keycloak subsystem add update handler. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemParser.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemParser.java index f3b2ffc2a1..71b3e451d0 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemParser.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/KeycloakSubsystemParser.java @@ -16,11 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import javax.xml.stream.XMLStreamConstants; -import javax.xml.stream.XMLStreamException; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.PathAddress; import org.jboss.as.controller.PathElement; @@ -36,6 +31,12 @@ import org.jboss.staxmapper.XMLElementWriter; import org.jboss.staxmapper.XMLExtendedStreamReader; import org.jboss.staxmapper.XMLExtendedStreamWriter; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + /** * The subsystem parser, which uses stax to read and write to and from xml */ diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java index 94b359c9c8..df393523cf 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmAddHandler.java @@ -17,17 +17,18 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractAddStepHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.dmr.ModelNode; +import org.jboss.msc.service.ServiceController; + +import java.util.List; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP; -import org.jboss.msc.service.ServiceController; /** * Add a new realm. diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java index 283b5d45c0..e590b427d1 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmDefinition.java @@ -16,21 +16,17 @@ */ package org.keycloak.subsystem.extension; +import org.jboss.as.controller.AttributeDefinition; +import org.jboss.as.controller.PathElement; +import org.jboss.as.controller.SimpleAttributeDefinition; +import org.jboss.as.controller.SimpleResourceDefinition; +import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; +import org.jboss.as.controller.registry.ManagementResourceRegistration; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.jboss.as.controller.AttributeDefinition; -import org.jboss.as.controller.PathElement; -import org.jboss.as.controller.SimpleAttributeDefinition; -import org.jboss.as.controller.SimpleAttributeDefinitionBuilder; -import org.jboss.as.controller.SimpleResourceDefinition; -import org.jboss.as.controller.operations.common.GenericSubsystemDescribeHandler; -import org.jboss.as.controller.operations.validation.IntRangeValidator; -import org.jboss.as.controller.operations.validation.StringLengthValidator; -import org.jboss.as.controller.registry.ManagementResourceRegistration; -import org.jboss.dmr.ModelNode; -import org.jboss.dmr.ModelType; /** * Defines attributes and operations for the Realm diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java old mode 100644 new mode 100755 index f6847b5d5d..1902b076bc --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/RealmWriteAttributeHandler.java @@ -17,13 +17,14 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractWriteAttributeHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.dmr.ModelNode; +import java.util.List; + /** * Update an attribute on a realm. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java old mode 100644 new mode 100755 index c5f795c4e1..b5b518aaad --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentAddHandler.java @@ -17,17 +17,18 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractAddStepHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.ServiceVerificationHandler; import org.jboss.dmr.ModelNode; +import org.jboss.msc.service.ServiceController; + +import java.util.List; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD; import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP; -import org.jboss.msc.service.ServiceController; /** * Add a deployment to a realm. diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java index 84adf7b8cf..2254dd6d3b 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentDefinition.java @@ -16,10 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.PathElement; import org.jboss.as.controller.SimpleAttributeDefinition; @@ -31,6 +27,11 @@ import org.jboss.as.controller.registry.ManagementResourceRegistration; import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + /** * Defines attributes and operations for a secure-deployment. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java old mode 100644 new mode 100755 index 8cc1f604d8..2caca6ae64 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SecureDeploymentWriteAttributeHandler.java @@ -17,7 +17,6 @@ package org.keycloak.subsystem.extension; -import java.util.List; import org.jboss.as.controller.AbstractWriteAttributeHandler; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.OperationContext; @@ -25,6 +24,8 @@ import org.jboss.as.controller.OperationFailedException; import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.dmr.ModelNode; +import java.util.List; + /** * Update an attribute on a secure-deployment. * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SharedAttributeDefinitons.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SharedAttributeDefinitons.java index 590de12c80..93e5e86d6b 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SharedAttributeDefinitons.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/extension/SharedAttributeDefinitons.java @@ -16,8 +16,6 @@ */ package org.keycloak.subsystem.extension; -import java.util.ArrayList; -import java.util.List; import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.as.controller.SimpleAttributeDefinitionBuilder; import org.jboss.as.controller.operations.validation.IntRangeValidator; @@ -25,6 +23,9 @@ import org.jboss.as.controller.operations.validation.StringLengthValidator; import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelType; +import java.util.ArrayList; +import java.util.List; + /** * Defines attributes that can be present in both a realm and an application (secure-deployment). * diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java index 0ab14f7e6f..55694d22df 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakLogger.java @@ -16,17 +16,13 @@ */ package org.keycloak.subsystem.logging; -import java.util.List; import org.jboss.logging.BasicLogger; -import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.Logger; +import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message; import org.jboss.logging.annotations.MessageLogger; -import org.jboss.vfs.VirtualFile; -import static org.jboss.logging.Logger.Level.ERROR; import static org.jboss.logging.Logger.Level.INFO; -import static org.jboss.logging.Logger.Level.WARN; /** * This interface to be fleshed out later when error messages are fully externalized. diff --git a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakMessages.java b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakMessages.java index 4859f24f36..09f7bc2608 100755 --- a/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakMessages.java +++ b/integration/wildfly-subsystem/src/main/java/org/keycloak/subsystem/logging/KeycloakMessages.java @@ -16,8 +16,8 @@ */ package org.keycloak.subsystem.logging; -import org.jboss.logging.annotations.MessageBundle; import org.jboss.logging.Messages; +import org.jboss.logging.annotations.MessageBundle; /** * This interface to be fleshed out later when error messages are fully externalized. diff --git a/integration/wildfly-subsystem/src/test/java/org/keycloak/subsystem/extension/SubsystemParsingTestCase.java b/integration/wildfly-subsystem/src/test/java/org/keycloak/subsystem/extension/SubsystemParsingTestCase.java old mode 100644 new mode 100755 index b73c3c5f98..ba87801ca5 --- a/integration/wildfly-subsystem/src/test/java/org/keycloak/subsystem/extension/SubsystemParsingTestCase.java +++ b/integration/wildfly-subsystem/src/test/java/org/keycloak/subsystem/extension/SubsystemParsingTestCase.java @@ -27,11 +27,7 @@ import org.junit.Test; import java.util.List; -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.ADD; -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.DESCRIBE; -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP; -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.OP_ADDR; -import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.SUBSYSTEM; +import static org.jboss.as.controller.descriptions.ModelDescriptionConstants.*; /** diff --git a/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java b/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java index 047c2d2241..956779fd11 100755 --- a/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java +++ b/model/api/src/main/java/org/keycloak/models/UserFederationProviderFactory.java @@ -2,7 +2,6 @@ package org.keycloak.models; import org.keycloak.provider.ProviderFactory; -import java.util.List; import java.util.Set; /** diff --git a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java index 7e183b7786..ab3c865241 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java +++ b/model/api/src/main/java/org/keycloak/models/utils/ModelToRepresentation.java @@ -5,16 +5,15 @@ import org.keycloak.models.ClaimMask; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; import org.keycloak.models.Constants; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; import org.keycloak.models.SocialLinkModel; import org.keycloak.models.UserCredentialModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; -import org.keycloak.representations.idm.UserFederationProviderRepresentation; import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ClaimRepresentation; import org.keycloak.representations.idm.CredentialRepresentation; @@ -23,6 +22,7 @@ import org.keycloak.representations.idm.RealmAuditRepresentation; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.SocialLinkRepresentation; +import org.keycloak.representations.idm.UserFederationProviderRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.representations.idm.UserSessionRepresentation; diff --git a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java index 3e971c8b81..66c8be9b06 100755 --- a/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java +++ b/model/api/src/main/java/org/keycloak/models/utils/RepresentationToModel.java @@ -2,10 +2,10 @@ package org.keycloak.models.utils; import net.iharder.Base64; import org.jboss.logging.Logger; +import org.keycloak.enums.SslRequired; import org.keycloak.models.ApplicationModel; import org.keycloak.models.ClaimMask; import org.keycloak.models.ClientModel; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.PasswordPolicy; @@ -14,9 +14,8 @@ import org.keycloak.models.RoleModel; import org.keycloak.models.SocialLinkModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserCredentialValueModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; -import org.keycloak.enums.SslRequired; -import org.keycloak.representations.idm.UserFederationProviderRepresentation; import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.ClaimRepresentation; import org.keycloak.representations.idm.CredentialRepresentation; @@ -25,6 +24,7 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RoleRepresentation; import org.keycloak.representations.idm.ScopeMappingRepresentation; import org.keycloak.representations.idm.SocialLinkRepresentation; +import org.keycloak.representations.idm.UserFederationProviderRepresentation; import org.keycloak.representations.idm.UserRepresentation; import java.io.IOException; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/DefaultCacheRealmProvider.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/DefaultCacheRealmProvider.java index dfbd165ec4..607a10ccaf 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/DefaultCacheRealmProvider.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/DefaultCacheRealmProvider.java @@ -3,11 +3,10 @@ package org.keycloak.models.cache; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakTransaction; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; -import org.keycloak.models.UserModel; import org.keycloak.models.cache.entities.CachedApplication; import org.keycloak.models.cache.entities.CachedApplicationRole; import org.keycloak.models.cache.entities.CachedOAuthClient; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProvider.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProvider.java index e704042945..e7b1551c2d 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProvider.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/NoCacheRealmProvider.java @@ -2,9 +2,9 @@ package org.keycloak.models.cache; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import java.util.List; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java index a8f1d6165a..5268441877 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/RealmAdapter.java @@ -1,16 +1,16 @@ package org.keycloak.models.cache; import org.keycloak.Config; +import org.keycloak.enums.SslRequired; import org.keycloak.models.ApplicationModel; import org.keycloak.models.ClientModel; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.cache.entities.CachedRealm; -import org.keycloak.enums.SslRequired; import org.keycloak.models.utils.KeycloakModelUtils; import java.security.PrivateKey; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedApplication.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedApplication.java index db0e1c0a4f..004c7ff100 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedApplication.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedApplication.java @@ -1,8 +1,8 @@ package org.keycloak.models.cache.entities; import org.keycloak.models.ApplicationModel; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.cache.RealmCache; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java index a48b104c73..5ee1e8d289 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedClient.java @@ -1,8 +1,8 @@ package org.keycloak.models.cache.entities; import org.keycloak.models.ClientModel; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.cache.RealmCache; diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedOAuthClient.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedOAuthClient.java index 0ab872af3f..dfaceb9c82 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedOAuthClient.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedOAuthClient.java @@ -1,8 +1,8 @@ package org.keycloak.models.cache.entities; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.cache.RealmCache; /** diff --git a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedRealm.java b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedRealm.java index fc8cc0b449..cacc0843c6 100755 --- a/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedRealm.java +++ b/model/invalidation-cache/model-adapters/src/main/java/org/keycloak/models/cache/entities/CachedRealm.java @@ -1,15 +1,15 @@ package org.keycloak.models.cache.entities; +import org.keycloak.enums.SslRequired; import org.keycloak.models.ApplicationModel; -import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.cache.RealmCache; -import org.keycloak.enums.SslRequired; import java.util.ArrayList; import java.util.HashMap; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/ApplicationAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/ApplicationAdapter.java index f83599c055..05c4d5c85a 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/ApplicationAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/ApplicationAdapter.java @@ -8,7 +8,6 @@ import org.keycloak.models.RoleContainerModel; import org.keycloak.models.RoleModel; import org.keycloak.models.jpa.entities.ApplicationEntity; import org.keycloak.models.jpa.entities.RoleEntity; -import org.keycloak.models.jpa.entities.ScopeMappingEntity; import org.keycloak.models.utils.KeycloakModelUtils; import javax.persistence.EntityManager; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProvider.java b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProvider.java index a80485b594..c62a9c92b2 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProvider.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/JpaRealmProvider.java @@ -2,9 +2,9 @@ package org.keycloak.models.jpa; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.jpa.entities.ApplicationEntity; import org.keycloak.models.jpa.entities.OAuthClientEntity; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java b/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java index 613dd4536e..c53354ebba 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/RealmAdapter.java @@ -1,21 +1,21 @@ package org.keycloak.models.jpa; +import org.keycloak.enums.SslRequired; import org.keycloak.models.ApplicationModel; import org.keycloak.models.ClientModel; -import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.enums.SslRequired; -import org.keycloak.models.jpa.entities.UserFederationProviderEntity; import org.keycloak.models.KeycloakSession; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.jpa.entities.ApplicationEntity; import org.keycloak.models.jpa.entities.OAuthClientEntity; import org.keycloak.models.jpa.entities.RealmEntity; import org.keycloak.models.jpa.entities.RequiredCredentialEntity; import org.keycloak.models.jpa.entities.RoleEntity; +import org.keycloak.models.jpa.entities.UserFederationProviderEntity; import org.keycloak.models.utils.KeycloakModelUtils; import javax.persistence.EntityManager; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ApplicationEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ApplicationEntity.java index c34761fa5f..a20ca3d3a5 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ApplicationEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ApplicationEntity.java @@ -7,7 +7,6 @@ import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.OneToMany; -import javax.persistence.Table; import java.util.ArrayList; import java.util.Collection; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/CredentialEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/CredentialEntity.java index 439987f313..de4039c9f4 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/CredentialEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/CredentialEntity.java @@ -4,13 +4,11 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; -import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; -import java.io.Serializable; /** * @author Bill Burke diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/OAuthClientEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/OAuthClientEntity.java index 7fac887f78..191ec50f93 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/OAuthClientEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/OAuthClientEntity.java @@ -2,7 +2,6 @@ package org.keycloak.models.jpa.entities; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ScopeMappingEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ScopeMappingEntity.java index 93d375d9e5..2c8b494175 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ScopeMappingEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/ScopeMappingEntity.java @@ -1,6 +1,5 @@ package org.keycloak.models.jpa.entities; -import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java index 3c5cc49475..5264f17de4 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserEntity.java @@ -1,30 +1,18 @@ package org.keycloak.models.jpa.entities; -import org.keycloak.models.UserModel; import org.keycloak.models.utils.KeycloakModelUtils; import javax.persistence.CascadeType; -import javax.persistence.CollectionTable; import javax.persistence.Column; -import javax.persistence.ElementCollection; import javax.persistence.Entity; -import javax.persistence.FetchType; import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.MapKeyColumn; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; -import javax.persistence.OneToOne; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; /** * @author Bill Burke diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java index f1fa0bd6f4..aec144e6fc 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserFederationProviderEntity.java @@ -6,12 +6,10 @@ import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; -import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.MapKeyColumn; import javax.persistence.Table; -import java.io.Serializable; import java.util.Map; /** diff --git a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserRequiredActionEntity.java b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserRequiredActionEntity.java index d7221cd356..1818b75644 100755 --- a/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserRequiredActionEntity.java +++ b/model/jpa/src/main/java/org/keycloak/models/jpa/entities/UserRequiredActionEntity.java @@ -12,7 +12,6 @@ import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; - import java.io.Serializable; /** diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java index d172ea5c73..dae9f4fcb7 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/ClientAdapter.java @@ -4,8 +4,8 @@ import org.keycloak.connections.mongo.api.MongoIdentifiableEntity; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.entities.ClientEntity; import org.keycloak.models.mongo.keycloak.entities.MongoRoleEntity; diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProvider.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProvider.java index a025e89ae2..7ce4935bc2 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProvider.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/MongoRealmProvider.java @@ -7,9 +7,9 @@ import org.keycloak.connections.mongo.api.MongoStore; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.mongo.keycloak.entities.MongoApplicationEntity; import org.keycloak.models.mongo.keycloak.entities.MongoOAuthClientEntity; diff --git a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java index f1626d14a6..f275dee36b 100755 --- a/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java +++ b/model/mongo/src/main/java/org/keycloak/models/mongo/keycloak/adapters/RealmAdapter.java @@ -4,19 +4,19 @@ import com.mongodb.DBObject; import com.mongodb.QueryBuilder; import org.jboss.logging.Logger; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; +import org.keycloak.enums.SslRequired; import org.keycloak.models.ApplicationModel; import org.keycloak.models.ClientModel; -import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.models.entities.UserFederationProviderEntity; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.OAuthClientModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RequiredCredentialModel; import org.keycloak.models.RoleModel; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.entities.RequiredCredentialEntity; -import org.keycloak.enums.SslRequired; +import org.keycloak.models.entities.UserFederationProviderEntity; import org.keycloak.models.mongo.keycloak.entities.MongoApplicationEntity; import org.keycloak.models.mongo.keycloak.entities.MongoOAuthClientEntity; import org.keycloak.models.mongo.keycloak.entities.MongoRealmEntity; diff --git a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/ClientSessionEntity.java b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/ClientSessionEntity.java index 65df66396d..ffd62c3cee 100755 --- a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/ClientSessionEntity.java +++ b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/ClientSessionEntity.java @@ -4,21 +4,17 @@ import org.keycloak.models.ClientSessionModel; import javax.persistence.CascadeType; import javax.persistence.Column; -import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; -import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; -import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; -import java.util.List; /** * @author Bill Burke diff --git a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UserSessionEntity.java b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UserSessionEntity.java index 3716c3ca64..e807861e48 100755 --- a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UserSessionEntity.java +++ b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UserSessionEntity.java @@ -3,13 +3,11 @@ package org.keycloak.models.sessions.jpa.entities; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; - import java.util.ArrayList; import java.util.Collection; diff --git a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UsernameLoginFailureEntity.java b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UsernameLoginFailureEntity.java index 23dd52f041..899d80e7ca 100755 --- a/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UsernameLoginFailureEntity.java +++ b/model/sessions-jpa/src/main/java/org/keycloak/models/sessions/jpa/entities/UsernameLoginFailureEntity.java @@ -7,7 +7,6 @@ import javax.persistence.IdClass; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; - import java.io.Serializable; /** diff --git a/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/UserSessionAdapter.java b/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/UserSessionAdapter.java index 2d1b16aac4..6a3a963cd0 100755 --- a/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/UserSessionAdapter.java +++ b/model/sessions-mem/src/main/java/org/keycloak/models/sessions/mem/UserSessionAdapter.java @@ -1,6 +1,5 @@ package org.keycloak.models.sessions.mem; -import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; diff --git a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoClientSessionEntity.java b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoClientSessionEntity.java old mode 100644 new mode 100755 index 5bd9ac2d47..d454f27b31 --- a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoClientSessionEntity.java +++ b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoClientSessionEntity.java @@ -2,9 +2,7 @@ package org.keycloak.models.sessions.mongo.entities; import org.keycloak.models.ClientSessionModel; -import java.util.LinkedList; import java.util.List; -import java.util.Set; /** * @author Stian Thorgersen diff --git a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java index 89679def33..5f2bd28e52 100755 --- a/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java +++ b/model/sessions-mongo/src/main/java/org/keycloak/models/sessions/mongo/entities/MongoUserSessionEntity.java @@ -5,8 +5,6 @@ import org.keycloak.connections.mongo.api.MongoIdentifiableEntity; import org.keycloak.connections.mongo.api.context.MongoStoreInvocationContext; import org.keycloak.models.entities.AbstractIdentifiableEntity; -import java.util.ArrayList; -import java.util.LinkedList; import java.util.List; /** diff --git a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/idm/KeycloakEventBridge.java b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/idm/KeycloakEventBridge.java old mode 100644 new mode 100755 index b17e369301..3e8be5a505 --- a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/idm/KeycloakEventBridge.java +++ b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/idm/KeycloakEventBridge.java @@ -1,9 +1,5 @@ package org.keycloak.picketlink.idm; -import javax.naming.directory.BasicAttribute; -import javax.naming.directory.DirContext; -import javax.naming.directory.ModificationItem; - import org.jboss.logging.Logger; import org.picketlink.idm.PartitionManager; import org.picketlink.idm.event.CredentialUpdatedEvent; @@ -15,6 +11,10 @@ import org.picketlink.idm.spi.CredentialStore; import org.picketlink.idm.spi.IdentityContext; import org.picketlink.idm.spi.StoreSelector; +import javax.naming.directory.BasicAttribute; +import javax.naming.directory.DirContext; +import javax.naming.directory.ModificationItem; + /** * @author Marek Posolda */ diff --git a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/PartitionManagerRegistry.java b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/PartitionManagerRegistry.java old mode 100644 new mode 100755 index 03fcf5bad6..ec1ba5866a --- a/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/PartitionManagerRegistry.java +++ b/picketlink/keycloak-picketlink-ldap/src/main/java/org/keycloak/picketlink/ldap/PartitionManagerRegistry.java @@ -1,10 +1,5 @@ package org.keycloak.picketlink.ldap; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.concurrent.ConcurrentHashMap; - import org.jboss.logging.Logger; import org.keycloak.models.LDAPConstants; import org.keycloak.models.UserFederationProviderModel; @@ -17,10 +12,12 @@ import org.picketlink.idm.config.LDAPStoreConfigurationBuilder; import org.picketlink.idm.internal.DefaultPartitionManager; import org.picketlink.idm.model.basic.User; -import static org.picketlink.common.constants.LDAPConstants.CN; -import static org.picketlink.common.constants.LDAPConstants.EMAIL; -import static org.picketlink.common.constants.LDAPConstants.SN; -import static org.picketlink.common.constants.LDAPConstants.UID; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + +import static org.picketlink.common.constants.LDAPConstants.*; /** * @author Marek Posolda diff --git a/services/src/main/java/org/keycloak/services/DefaultKeycloakSession.java b/services/src/main/java/org/keycloak/services/DefaultKeycloakSession.java index bf17429737..e83f84d510 100755 --- a/services/src/main/java/org/keycloak/services/DefaultKeycloakSession.java +++ b/services/src/main/java/org/keycloak/services/DefaultKeycloakSession.java @@ -1,10 +1,10 @@ package org.keycloak.services; -import org.keycloak.models.UserFederationManager; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakTransactionManager; import org.keycloak.models.RealmProvider; +import org.keycloak.models.UserFederationManager; import org.keycloak.models.UserProvider; import org.keycloak.models.UserSessionProvider; import org.keycloak.models.cache.CacheRealmProvider; diff --git a/services/src/main/java/org/keycloak/services/managers/AppAuthManager.java b/services/src/main/java/org/keycloak/services/managers/AppAuthManager.java index 8155e01cc5..88ebc58f1f 100755 --- a/services/src/main/java/org/keycloak/services/managers/AppAuthManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AppAuthManager.java @@ -6,7 +6,6 @@ import org.keycloak.ClientConnection; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import javax.ws.rs.core.Cookie; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.UriInfo; diff --git a/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java b/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java index 559a39dde3..6385c133ed 100755 --- a/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java +++ b/services/src/main/java/org/keycloak/services/managers/ApplianceBootstrap.java @@ -2,6 +2,7 @@ package org.keycloak.services.managers; import org.jboss.logging.Logger; import org.keycloak.Config; +import org.keycloak.enums.SslRequired; import org.keycloak.models.AdminRoles; import org.keycloak.models.ApplicationModel; import org.keycloak.models.Constants; @@ -11,7 +12,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; -import org.keycloak.enums.SslRequired; import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.representations.idm.CredentialRepresentation; diff --git a/services/src/main/java/org/keycloak/services/managers/AuditManager.java b/services/src/main/java/org/keycloak/services/managers/AuditManager.java old mode 100644 new mode 100755 index 1ddd4782fa..5aa416775f --- a/services/src/main/java/org/keycloak/services/managers/AuditManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuditManager.java @@ -1,12 +1,12 @@ package org.keycloak.services.managers; import org.jboss.logging.Logger; +import org.keycloak.ClientConnection; import org.keycloak.audit.Audit; import org.keycloak.audit.AuditListener; import org.keycloak.audit.AuditProvider; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.ClientConnection; import java.util.LinkedList; import java.util.List; 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 64ce3a57bb..45f1a42a49 100755 --- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java +++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java @@ -1,6 +1,7 @@ package org.keycloak.services.managers; import org.jboss.logging.Logger; +import org.keycloak.ClientConnection; import org.keycloak.RSATokenVerifier; import org.keycloak.VerificationException; import org.keycloak.jose.jws.JWSBuilder; @@ -13,7 +14,6 @@ import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.representations.AccessToken; import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.ClientConnection; import org.keycloak.services.resources.RealmsResource; import org.keycloak.services.util.CookieHelper; import org.keycloak.util.Time; diff --git a/services/src/main/java/org/keycloak/services/managers/BruteForceProtector.java b/services/src/main/java/org/keycloak/services/managers/BruteForceProtector.java index dd2b7af70b..1d1a2838e2 100755 --- a/services/src/main/java/org/keycloak/services/managers/BruteForceProtector.java +++ b/services/src/main/java/org/keycloak/services/managers/BruteForceProtector.java @@ -2,11 +2,11 @@ package org.keycloak.services.managers; import org.jboss.logging.Logger; +import org.keycloak.ClientConnection; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.models.UsernameLoginFailureModel; -import org.keycloak.ClientConnection; import java.util.ArrayList; import java.util.Collections; diff --git a/services/src/main/java/org/keycloak/services/managers/RealmManager.java b/services/src/main/java/org/keycloak/services/managers/RealmManager.java index 6456d9ed97..ae1e116aa8 100755 --- a/services/src/main/java/org/keycloak/services/managers/RealmManager.java +++ b/services/src/main/java/org/keycloak/services/managers/RealmManager.java @@ -9,8 +9,8 @@ import org.keycloak.models.AdminRoles; import org.keycloak.models.ApplicationModel; import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmProvider; import org.keycloak.models.RealmModel; +import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionProvider; diff --git a/services/src/main/java/org/keycloak/services/resources/RealmsResource.java b/services/src/main/java/org/keycloak/services/resources/RealmsResource.java index 09ed95cfdc..a2f13ca361 100755 --- a/services/src/main/java/org/keycloak/services/resources/RealmsResource.java +++ b/services/src/main/java/org/keycloak/services/resources/RealmsResource.java @@ -5,13 +5,13 @@ import org.jboss.resteasy.annotations.cache.NoCache; import org.jboss.resteasy.spi.BadRequestException; import org.jboss.resteasy.spi.NotFoundException; import org.jboss.resteasy.spi.ResteasyProviderFactory; +import org.keycloak.ClientConnection; import org.keycloak.audit.Audit; import org.keycloak.models.ApplicationModel; import org.keycloak.models.ClientModel; import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.ClientConnection; import org.keycloak.services.managers.AuditManager; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.BruteForceProtector; 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 4e33e75152..ebff3f63d3 100755 --- a/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java +++ b/services/src/main/java/org/keycloak/services/resources/RequiredActionsService.java @@ -23,6 +23,7 @@ package org.keycloak.services.resources; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.HttpRequest; +import org.keycloak.ClientConnection; import org.keycloak.OAuth2Constants; import org.keycloak.audit.Audit; import org.keycloak.audit.Details; @@ -41,7 +42,6 @@ import org.keycloak.models.UserModel.RequiredAction; import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.TimeBasedOTP; import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.ClientConnection; import org.keycloak.services.managers.AccessCode; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.TokenManager; diff --git a/services/src/main/java/org/keycloak/services/resources/SocialResource.java b/services/src/main/java/org/keycloak/services/resources/SocialResource.java index 84439e4cd1..6f9936bfad 100755 --- a/services/src/main/java/org/keycloak/services/resources/SocialResource.java +++ b/services/src/main/java/org/keycloak/services/resources/SocialResource.java @@ -24,6 +24,7 @@ package org.keycloak.services.resources; import org.jboss.logging.Logger; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.jboss.resteasy.spi.HttpRequest; +import org.keycloak.ClientConnection; import org.keycloak.OAuth2Constants; import org.keycloak.audit.Audit; import org.keycloak.audit.Details; @@ -39,7 +40,6 @@ import org.keycloak.models.SocialLinkModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.KeycloakModelUtils; -import org.keycloak.ClientConnection; import org.keycloak.services.managers.AuditManager; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.RealmManager; 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 df5fbc3115..028862860e 100755 --- a/services/src/main/java/org/keycloak/services/resources/TokenService.java +++ b/services/src/main/java/org/keycloak/services/resources/TokenService.java @@ -9,10 +9,10 @@ import org.jboss.resteasy.spi.HttpResponse; import org.jboss.resteasy.spi.NotAcceptableException; import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.jboss.resteasy.spi.UnauthorizedException; +import org.keycloak.ClientConnection; import org.keycloak.OAuth2Constants; import org.keycloak.OAuthErrorException; import org.keycloak.RSATokenVerifier; -import org.keycloak.VerificationException; import org.keycloak.audit.Audit; import org.keycloak.audit.Details; import org.keycloak.audit.Errors; @@ -33,7 +33,6 @@ import org.keycloak.representations.AccessToken; import org.keycloak.representations.AccessTokenResponse; import org.keycloak.representations.RefreshToken; import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.ClientConnection; import org.keycloak.services.managers.AccessCode; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus; @@ -46,7 +45,6 @@ import org.keycloak.services.resources.flows.Urls; import org.keycloak.services.validation.Validation; import org.keycloak.util.Base64Url; import org.keycloak.util.BasicAuthHelper; -import org.keycloak.util.Time; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java index e947b1ed6b..44875ef5b6 100755 --- a/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java +++ b/services/src/main/java/org/keycloak/services/resources/admin/UserFederationResource.java @@ -1,46 +1,16 @@ package org.keycloak.services.resources.admin; import org.jboss.logging.Logger; -import org.jboss.resteasy.annotations.cache.NoCache; -import org.jboss.resteasy.spi.BadRequestException; import org.jboss.resteasy.spi.NotFoundException; -import org.keycloak.email.EmailException; -import org.keycloak.email.EmailProvider; -import org.keycloak.models.ApplicationModel; -import org.keycloak.models.ClientModel; -import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.ModelDuplicateException; import org.keycloak.models.RealmModel; -import org.keycloak.models.RoleModel; -import org.keycloak.models.SocialLinkModel; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderFactory; import org.keycloak.models.UserFederationProviderModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.UserProviderFactory; -import org.keycloak.models.UserSessionModel; import org.keycloak.models.utils.ModelToRepresentation; -import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.provider.ProviderFactory; -import org.keycloak.representations.adapters.action.UserStats; -import org.keycloak.representations.idm.ApplicationMappingsRepresentation; -import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.representations.idm.MappingsRepresentation; -import org.keycloak.representations.idm.RoleRepresentation; -import org.keycloak.representations.idm.SocialLinkRepresentation; import org.keycloak.representations.idm.UserFederationProviderFactoryRepresentation; import org.keycloak.representations.idm.UserFederationProviderRepresentation; -import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.representations.idm.UserSessionRepresentation; -import org.keycloak.services.managers.AccessCode; -import org.keycloak.services.managers.RealmManager; -import org.keycloak.services.managers.ResourceAdminManager; -import org.keycloak.services.managers.TokenManager; -import org.keycloak.services.managers.UserManager; -import org.keycloak.services.resources.flows.Flows; -import org.keycloak.services.resources.flows.Urls; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; @@ -50,20 +20,11 @@ import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriBuilder; import javax.ws.rs.core.UriInfo; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; /** * Base resource for managing users diff --git a/social/core/src/main/java/org/keycloak/social/AbstractOAuth2Provider.java b/social/core/src/main/java/org/keycloak/social/AbstractOAuth2Provider.java old mode 100644 new mode 100755 index 5e81ecdfe4..43eefc16b5 --- a/social/core/src/main/java/org/keycloak/social/AbstractOAuth2Provider.java +++ b/social/core/src/main/java/org/keycloak/social/AbstractOAuth2Provider.java @@ -5,7 +5,6 @@ import org.keycloak.OAuth2Constants; import org.keycloak.social.utils.SimpleHttp; import java.io.IOException; -import java.net.URI; import java.util.regex.Matcher; import java.util.regex.Pattern; 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 old mode 100644 new mode 100755 index e63b4b1bd5..7e9340bf1e --- 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 @@ -1,6 +1,5 @@ package org.keycloak.social.utils; -import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.ObjectNode; diff --git a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterProvider.java b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterProvider.java index a7824d6dd3..7a6c88b35f 100755 --- a/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterProvider.java +++ b/social/twitter/src/main/java/org/keycloak/social/twitter/TwitterProvider.java @@ -28,7 +28,6 @@ import org.keycloak.social.SocialProvider; import org.keycloak.social.SocialProviderConfig; import org.keycloak.social.SocialProviderException; import org.keycloak.social.SocialUser; -import org.keycloak.social.UriBuilder; import twitter4j.Twitter; import twitter4j.TwitterFactory; import twitter4j.auth.RequestToken; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java index 0177ea107a..a5a0b6eeda 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java +++ b/testsuite/integration/src/main/java/org/keycloak/testutils/DummyUserFederationProviderFactory.java @@ -6,9 +6,7 @@ import org.keycloak.models.UserFederationProvider; import org.keycloak.models.UserFederationProviderFactory; import org.keycloak.models.UserFederationProviderModel; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Set; /** diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/LDAPEmbeddedServer.java b/testsuite/integration/src/main/java/org/keycloak/testutils/LDAPEmbeddedServer.java index 5debd5ee69..466952a570 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/LDAPEmbeddedServer.java +++ b/testsuite/integration/src/main/java/org/keycloak/testutils/LDAPEmbeddedServer.java @@ -1,7 +1,6 @@ package org.keycloak.testutils; import org.keycloak.models.LDAPConstants; -import org.keycloak.models.RealmModel; import org.picketbox.test.ldap.AbstractLDAPTest; import javax.naming.CompositeName; diff --git a/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java b/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java index 280805724f..455c190da4 100755 --- a/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java +++ b/testsuite/integration/src/main/java/org/keycloak/testutils/TotpGenerator.java @@ -3,7 +3,6 @@ package org.keycloak.testutils; import org.keycloak.models.utils.Base32; import org.keycloak.models.utils.TimeBasedOTP; -import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java index 282823d0b3..fa2b7674bb 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/AssertEvents.java @@ -22,13 +22,11 @@ import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.util.Time; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; -import java.util.UUID; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/DummySocial.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummySocial.java index f3d9a3f516..f473cb9e9a 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/DummySocial.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/DummySocial.java @@ -3,15 +3,12 @@ package org.keycloak.testsuite; import org.keycloak.OAuth2Constants; import org.keycloak.social.AuthCallback; import org.keycloak.social.AuthRequest; -import org.keycloak.social.UriBuilder; import org.keycloak.social.SocialAccessDeniedException; import org.keycloak.social.SocialProvider; import org.keycloak.social.SocialProviderConfig; import org.keycloak.social.SocialProviderException; import org.keycloak.social.SocialUser; -import java.net.URI; - public class DummySocial implements SocialProvider { private static final String AUTH_PATH = "http://localhost:8081/dummy-social/auth"; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/OAuthClient.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/OAuthClient.java index 9a14580c4e..a674407950 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/OAuthClient.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/OAuthClient.java @@ -26,7 +26,6 @@ import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.impl.client.DefaultHttpClient; @@ -38,11 +37,8 @@ import org.keycloak.RSATokenVerifier; import org.keycloak.VerificationException; import org.keycloak.jose.jws.JWSInput; import org.keycloak.jose.jws.crypto.RSAProvider; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.RealmModel; import org.keycloak.representations.AccessToken; import org.keycloak.representations.RefreshToken; -import org.keycloak.services.managers.AccessCode; import org.keycloak.services.resources.TokenService; import org.keycloak.util.BasicAuthHelper; import org.keycloak.util.PemUtils; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java index 7c3c3da8d8..0d0c170302 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/account/AccountTest.java @@ -34,7 +34,6 @@ import org.keycloak.models.ApplicationModel; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; import org.keycloak.models.UserCredentialModel; -import org.keycloak.models.UserCredentialValueModel; import org.keycloak.models.UserModel; import org.keycloak.models.utils.TimeBasedOTP; import org.keycloak.representations.idm.CredentialRepresentation; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java index 9ca52a3a25..012cb9e184 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java @@ -33,8 +33,8 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.AssertEvents; -import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.MailUtil; +import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.LoginPage; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java index a38ced3bbb..dcc844c962 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java @@ -32,7 +32,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.utils.TimeBasedOTP; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.RealmManager; -import org.keycloak.services.resources.AccountService; import org.keycloak.testsuite.AssertEvents; import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.pages.AccountTotpPage; @@ -48,8 +47,6 @@ import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; import org.openqa.selenium.WebDriver; -import javax.ws.rs.core.UriBuilder; - /** * @author Stian Thorgersen */ diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTest.java index 6e746cc228..8e56f1b538 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/adapter/AdapterTest.java @@ -21,15 +21,14 @@ */ package org.keycloak.testsuite.adapter; -import org.keycloak.Version; -import org.keycloak.adapters.AdapterConstants; -import org.keycloak.util.BasicAuthHelper; import org.junit.Assert; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.keycloak.Config; import org.keycloak.OAuth2Constants; +import org.keycloak.Version; +import org.keycloak.adapters.AdapterConstants; import org.keycloak.models.ApplicationModel; import org.keycloak.models.Constants; import org.keycloak.models.KeycloakSession; @@ -49,6 +48,7 @@ import org.keycloak.testsuite.rule.AbstractKeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; import org.keycloak.testutils.KeycloakServer; +import org.keycloak.util.BasicAuthHelper; import org.openqa.selenium.WebDriver; import javax.ws.rs.client.Client; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AbstractClientTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AbstractClientTest.java old mode 100644 new mode 100755 index 4df9370ba6..43b4494b2b --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AbstractClientTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/AbstractClientTest.java @@ -3,8 +3,6 @@ package org.keycloak.testsuite.admin; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; import org.keycloak.admin.client.Keycloak; import org.keycloak.admin.client.resource.RealmResource; import org.keycloak.models.Constants; @@ -12,20 +10,15 @@ import org.keycloak.models.RealmModel; import org.keycloak.representations.idm.ApplicationRepresentation; import org.keycloak.representations.idm.OAuthClientRepresentation; import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.rule.KeycloakRule; -import javax.ws.rs.ClientErrorException; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; /** * @author Stian Thorgersen diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/OAuthClientTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/OAuthClientTest.java old mode 100644 new mode 100755 index 421977562f..44cf762a8f --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/OAuthClientTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/admin/OAuthClientTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.admin; -import org.junit.Ignore; import org.junit.Test; import org.keycloak.representations.idm.OAuthClientRepresentation; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java index 0dc40ff675..27f920e6dc 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/exportimport/ExportImportTest.java @@ -1,23 +1,11 @@ package org.keycloak.testsuite.exportimport; -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.regex.Matcher; - import org.junit.Assert; import org.junit.ClassRule; -import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.rules.ExternalResource; import org.junit.rules.RuleChain; import org.junit.rules.TestRule; -import org.junit.runners.MethodSorters; import org.keycloak.Config; import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.dir.DirExportProvider; @@ -28,7 +16,6 @@ import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RealmProvider; import org.keycloak.models.UserCredentialModel; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserProvider; import org.keycloak.representations.idm.CredentialRepresentation; @@ -38,6 +25,15 @@ import org.keycloak.testsuite.model.AbstractModelTest; import org.keycloak.testsuite.model.ImportTest; import org.keycloak.testsuite.rule.KeycloakRule; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Properties; +import java.util.Set; +import java.util.regex.Matcher; + /** * @author Marek Posolda */ diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java index f14f125bd7..791e686f98 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/FederationProvidersIntegrationTest.java @@ -3,7 +3,6 @@ package org.keycloak.testsuite.forms; import org.junit.Assert; import org.junit.ClassRule; import org.junit.FixMethodOrder; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.RuleChain; @@ -12,16 +11,15 @@ import org.junit.runners.MethodSorters; import org.keycloak.OAuth2Constants; import org.keycloak.federation.ldap.LDAPFederationProvider; import org.keycloak.federation.ldap.LDAPFederationProviderFactory; -import org.keycloak.models.UserCredentialValueModel; -import org.keycloak.models.UserFederationProvider; -import org.keycloak.models.UserFederationProviderModel; import org.keycloak.federation.ldap.LDAPUtils; -import org.keycloak.picketlink.PartitionManagerProvider; -import org.keycloak.testutils.LDAPEmbeddedServer; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserCredentialModel; +import org.keycloak.models.UserCredentialValueModel; +import org.keycloak.models.UserFederationProvider; +import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; +import org.keycloak.picketlink.PartitionManagerProvider; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.OAuthClient; @@ -34,6 +32,7 @@ import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.testsuite.rule.LDAPRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; +import org.keycloak.testutils.LDAPEmbeddedServer; import org.openqa.selenium.WebDriver; import org.picketlink.idm.PartitionManager; import org.picketlink.idm.model.basic.User; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/LogoutTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/LogoutTest.java index 26c59e7f65..3f8bc1cf52 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/LogoutTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/LogoutTest.java @@ -32,14 +32,11 @@ import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; -import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; import java.io.IOException; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * @author Stian Thorgersen diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java index 9972c48ca1..451056553f 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java @@ -26,7 +26,6 @@ import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.keycloak.audit.Details; -import org.keycloak.audit.Event; import org.keycloak.audit.EventType; import org.keycloak.models.PasswordPolicy; import org.keycloak.models.RealmModel; @@ -35,8 +34,8 @@ import org.keycloak.models.UserModel; import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.managers.RealmManager; import org.keycloak.testsuite.AssertEvents; -import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.MailUtil; +import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.pages.AppPage; import org.keycloak.testsuite.pages.AppPage.RequestType; import org.keycloak.testsuite.pages.LoginPage; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/SSOTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/SSOTest.java index 7e9abfc49c..4796226189 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/SSOTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/SSOTest.java @@ -27,7 +27,6 @@ import org.junit.Rule; import org.junit.Test; import org.keycloak.OAuth2Constants; import org.keycloak.audit.Details; -import org.keycloak.services.resources.AccountService; import org.keycloak.testsuite.AssertEvents; import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.pages.AccountUpdateProfilePage; @@ -39,8 +38,6 @@ import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; import org.openqa.selenium.WebDriver; -import javax.ws.rs.core.UriBuilder; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java index db72c0d5c0..a3e0976043 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AbstractModelTest.java @@ -1,21 +1,16 @@ package org.keycloak.testsuite.model; import org.junit.After; -import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.ClassRule; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.models.RealmProvider; import org.keycloak.models.RoleModel; import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.services.managers.ApplianceBootstrap; import org.keycloak.services.managers.RealmManager; -import org.keycloak.services.resources.KeycloakApplication; import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.util.JsonSerialization; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ApplicationModelTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ApplicationModelTest.java index 6a9cb02ca8..84bd57ccda 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ApplicationModelTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ApplicationModelTest.java @@ -6,7 +6,6 @@ import org.junit.Test; import org.keycloak.models.ApplicationModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; -import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.models.utils.ModelToRepresentation; import org.keycloak.models.utils.RepresentationToModel; import org.keycloak.representations.idm.ApplicationRepresentation; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AuthenticationManagerTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AuthenticationManagerTest.java index a2742b5859..24a473df7a 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AuthenticationManagerTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/AuthenticationManagerTest.java @@ -5,13 +5,13 @@ import org.jboss.resteasy.spi.ResteasyProviderFactory; import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.keycloak.ClientConnection; import org.keycloak.models.RealmModel; import org.keycloak.models.UserCredentialModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserModel.RequiredAction; import org.keycloak.models.utils.TimeBasedOTP; import org.keycloak.representations.idm.CredentialRepresentation; -import org.keycloak.ClientConnection; import org.keycloak.services.managers.AuthenticationManager; import org.keycloak.services.managers.AuthenticationManager.AuthenticationStatus; import org.keycloak.services.managers.BruteForceProtector; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java index 96b60c684a..84645d8083 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/ImportTest.java @@ -18,8 +18,6 @@ import org.keycloak.models.UserFederationProviderModel; import org.keycloak.models.UserModel; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.services.managers.RealmManager; -import org.keycloak.testutils.DummyUserFederationProvider; -import org.keycloak.testutils.DummyUserFederationProviderFactory; import java.util.List; import java.util.Map; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserSessionProviderTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserSessionProviderTest.java index d7a29bed9b..f2c168cd3d 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserSessionProviderTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/model/UserSessionProviderTest.java @@ -14,18 +14,12 @@ import org.keycloak.testsuite.rule.KeycloakRule; import org.keycloak.util.Time; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * @author Stian Thorgersen diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AccessTokenTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AccessTokenTest.java index 55df18f296..155acb18ef 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AccessTokenTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AccessTokenTest.java @@ -29,7 +29,6 @@ import org.keycloak.OAuth2Constants; import org.keycloak.audit.Details; import org.keycloak.audit.Errors; import org.keycloak.audit.Event; -import org.keycloak.audit.EventType; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.representations.AccessToken; @@ -56,14 +55,9 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import java.net.URI; import java.util.HashMap; -import java.util.Map; -import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; -import static org.hamcrest.Matchers.lessThanOrEqualTo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; /** * @author Stian Thorgersen diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AuthorizationCodeTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AuthorizationCodeTest.java index 98c2270bf8..78cab61fc9 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AuthorizationCodeTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/AuthorizationCodeTest.java @@ -23,12 +23,10 @@ package org.keycloak.testsuite.oauth; import org.junit.Assert; import org.junit.ClassRule; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.keycloak.OAuth2Constants; import org.keycloak.audit.Details; -import org.keycloak.jose.jws.JWSInput; import org.keycloak.models.Constants; import org.keycloak.models.RealmModel; import org.keycloak.services.managers.AccessCode; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/RefreshTokenTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/RefreshTokenTest.java index e87737d1ac..361d0c1f84 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/RefreshTokenTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/RefreshTokenTest.java @@ -51,18 +51,12 @@ import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Form; -import javax.ws.rs.core.GenericType; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import java.net.URI; -import java.util.HashMap; -import static org.hamcrest.Matchers.allOf; -import static org.hamcrest.Matchers.greaterThan; -import static org.hamcrest.Matchers.greaterThanOrEqualTo; -import static org.hamcrest.Matchers.lessThan; -import static org.hamcrest.Matchers.lessThanOrEqualTo; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java index a869dcf987..a786037cff 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/pages/AccountUpdateProfilePage.java @@ -21,7 +21,6 @@ */ package org.keycloak.testsuite.pages; -import org.keycloak.services.resources.AccountService; import org.keycloak.services.resources.RealmsResource; import org.keycloak.testsuite.Constants; import org.openqa.selenium.WebElement; diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/perf/AccessTokenPerfTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/perf/AccessTokenPerfTest.java index 6f875874af..b2d80fc5c6 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/perf/AccessTokenPerfTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/perf/AccessTokenPerfTest.java @@ -23,7 +23,6 @@ package org.keycloak.testsuite.perf; import org.apache.http.NameValuePair; import org.apache.http.client.CookieStore; -import org.apache.http.client.HttpClient; import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.cookie.Cookie; import org.apache.http.impl.client.DefaultHttpClient; @@ -32,22 +31,14 @@ import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine; import org.junit.Assert; import org.junit.ClassRule; -import org.junit.Rule; import org.junit.Test; import org.keycloak.OAuth2Constants; import org.keycloak.adapters.HttpClientBuilder; -import org.keycloak.audit.Details; -import org.keycloak.audit.Errors; -import org.keycloak.audit.Event; -import org.keycloak.representations.AccessToken; import org.keycloak.services.resources.TokenService; -import org.keycloak.testsuite.AssertEvents; import org.keycloak.testsuite.Constants; import org.keycloak.testsuite.OAuthClient; import org.keycloak.testsuite.OAuthClient.AccessTokenResponse; -import org.keycloak.testsuite.pages.LoginPage; import org.keycloak.testsuite.rule.KeycloakRule; -import org.keycloak.testsuite.rule.WebResource; import org.keycloak.testsuite.rule.WebRule; import org.keycloak.util.BasicAuthHelper; import org.openqa.selenium.WebDriver; @@ -57,7 +48,6 @@ import javax.ws.rs.core.Form; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; - import java.net.URI; import java.util.Collections; import java.util.Date; @@ -66,10 +56,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - /** * @author Stian Thorgersen */ diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java index 0975f26831..b0fd0951dc 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/rule/AbstractKeycloakRule.java @@ -8,7 +8,6 @@ import io.undertow.servlet.api.WebResourceCollection; import org.junit.rules.ExternalResource; import org.keycloak.Config; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakTransaction; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; diff --git a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakPerfServer.java b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakPerfServer.java old mode 100644 new mode 100755 index cb9e239fa2..a6083a8f8c --- a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakPerfServer.java +++ b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakPerfServer.java @@ -1,9 +1,5 @@ package org.keycloak.testsuite.performance.web; -import java.io.InputStream; - -import javax.servlet.DispatcherType; - import io.undertow.server.handlers.resource.ClassPathResourceManager; import io.undertow.servlet.Servlets; import io.undertow.servlet.api.DeploymentInfo; @@ -16,6 +12,9 @@ import org.keycloak.services.filters.KeycloakSessionServletFilter; import org.keycloak.test.tools.KeycloakTestApplication; import org.keycloak.testutils.KeycloakServer; +import javax.servlet.DispatcherType; +import java.io.InputStream; + /** * @author Marek Posolda */ diff --git a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakToolsApplication.java b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakToolsApplication.java old mode 100644 new mode 100755 index e0612c1b39..64b1b6183d --- a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakToolsApplication.java +++ b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/KeycloakToolsApplication.java @@ -1,16 +1,15 @@ package org.keycloak.testsuite.performance.web; -import java.util.HashSet; -import java.util.Set; - -import javax.servlet.ServletContext; -import javax.ws.rs.core.Application; -import javax.ws.rs.core.Context; - import org.jboss.resteasy.core.Dispatcher; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.test.tools.PerfTools; +import javax.servlet.ServletContext; +import javax.ws.rs.core.Application; +import javax.ws.rs.core.Context; +import java.util.HashSet; +import java.util.Set; + /** * Modified version of {@link org.keycloak.test.tools.KeycloakTestApplication}, which shares ProviderSessionFactory with KeycloakApplication * diff --git a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java old mode 100644 new mode 100755 index 40409ad432..da75093f4d --- a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java +++ b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/OAuthClient.java @@ -1,18 +1,5 @@ package org.keycloak.testsuite.performance.web; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URI; -import java.net.URISyntaxException; -import java.security.PublicKey; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.UriBuilder; - import org.apache.commons.io.IOUtils; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; @@ -20,7 +7,6 @@ import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; -import org.apache.http.client.utils.URLEncodedUtils; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.jboss.resteasy.security.PemUtils; @@ -35,6 +21,14 @@ import org.keycloak.representations.RefreshToken; import org.keycloak.services.resources.TokenService; import org.keycloak.util.BasicAuthHelper; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.UriBuilder; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.PublicKey; +import java.util.LinkedList; +import java.util.List; + /** * TODO: Remove from here and instead merge with org.keycloak.testsuite.OAuthClient * diff --git a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/PerfAppServlet.java b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/PerfAppServlet.java old mode 100644 new mode 100755 index dbab2dafec..5fd6c01a17 --- a/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/PerfAppServlet.java +++ b/testsuite/performance-web/src/main/java/org/keycloak/testsuite/performance/web/PerfAppServlet.java @@ -1,16 +1,5 @@ package org.keycloak.testsuite.performance.web; -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - import freemarker.cache.ClassTemplateLoader; import freemarker.template.Configuration; import freemarker.template.Template; @@ -20,6 +9,16 @@ import org.keycloak.representations.AccessToken; import org.keycloak.representations.RefreshToken; import org.keycloak.util.Time; +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.io.StringWriter; +import java.io.Writer; +import java.util.HashMap; +import java.util.Map; + /** * @author Marek Posolda */ diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java b/testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java index 51ff6f3fc7..af6a8d1071 100755 --- a/testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java +++ b/testsuite/tools/src/main/java/org/keycloak/test/tools/PerfTools.java @@ -18,7 +18,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; - import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java index 32599b5f16..115d5ae035 100755 --- a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java +++ b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/CreateUsersJob.java @@ -2,7 +2,6 @@ package org.keycloak.test.tools.jobs; import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserCredentialModel; @@ -10,7 +9,6 @@ import org.keycloak.models.UserModel; import java.util.Map; import java.util.Set; -import java.util.concurrent.CountDownLatch; /** * @author Stian Thorgersen diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java index 03ee710f43..e2711089d6 100755 --- a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java +++ b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/DeleteUsersJob.java @@ -1,10 +1,5 @@ package org.keycloak.test.tools.jobs; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; @@ -12,6 +7,11 @@ import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * @author Marek Posolda */ diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java index 37e61a5b07..276b6d8e8d 100755 --- a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java +++ b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UpdateUsersJob.java @@ -1,10 +1,5 @@ package org.keycloak.test.tools.jobs; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; @@ -12,6 +7,11 @@ import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * @author Marek Posolda */ diff --git a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java index 5b7fc55288..b58a03bd29 100755 --- a/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java +++ b/testsuite/tools/src/main/java/org/keycloak/test/tools/jobs/UsersJob.java @@ -1,12 +1,5 @@ package org.keycloak.test.tools.jobs; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.CountDownLatch; - import org.keycloak.models.ApplicationModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; @@ -16,6 +9,13 @@ import org.keycloak.models.UserModel; import org.keycloak.services.managers.RealmManager; import org.keycloak.test.tools.PerfTools; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.CountDownLatch; + /** * @author Marek Posolda */