From fb421d3086682668f3908fba0238a4c55b06fcb3 Mon Sep 17 00:00:00 2001 From: Andrei Arlou Date: Thu, 5 Dec 2019 16:39:03 +0300 Subject: [PATCH] KEYCLOAK-12262 Remove unused imports from packages "authorization" and "authentification" in module "services" (#6547) --- .../authentication/AuthenticationProcessor.java | 1 - .../RequiredActionContextResult.java | 1 - .../actiontoken/DefaultActionTokenKey.java | 2 -- .../broker/IdpConfirmLinkAuthenticator.java | 1 - .../IdpEmailVerificationAuthenticator.java | 1 - .../ConditionalOtpFormAuthenticator.java | 1 - .../browser/PasswordFormFactory.java | 1 - .../browser/UsernameFormFactory.java | 1 - .../browser/UsernamePasswordFormFactory.java | 1 - .../browser/WebAuthnAuthenticator.java | 2 -- .../browser/WebAuthnAuthenticatorFactory.java | 3 --- ...oCookieFlowRedirectAuthenticatorFactory.java | 1 - .../cli/CliUsernamePasswordAuthenticator.java | 1 - ...CliUsernamePasswordAuthenticatorFactory.java | 2 -- .../console/ConsoleOTPFormAuthenticator.java | 1 - ...oleUsernamePasswordAuthenticatorFactory.java | 1 - .../directgrant/ValidatePassword.java | 3 --- .../X509ClientCertificateAuthenticator.java | 2 -- .../forms/RegistrationPassword.java | 1 - .../requiredactions/ConsoleUpdateProfile.java | 17 ----------------- .../requiredactions/ConsoleUpdateTotp.java | 1 - .../requiredactions/UpdateTotp.java | 1 - .../admin/PolicyResourceService.java | 2 -- .../authorization/admin/PolicyService.java | 5 ----- .../admin/PolicyTypeResourceService.java | 2 -- .../AuthorizationTokenService.java | 2 -- .../common/ClientModelIdentity.java | 2 -- .../authorization/common/KeycloakIdentity.java | 5 ----- .../authorization/common/UserModelIdentity.java | 1 - .../authorization/config/UmaConfiguration.java | 2 -- .../permission/AbstractPermissionService.java | 2 -- .../protection/resource/ResourceService.java | 2 -- .../authorization/util/Permissions.java | 1 - .../org/keycloak/authorization/util/Tokens.java | 4 ---- 34 files changed, 76 deletions(-) diff --git a/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java b/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java index 9a8a62fcbe..4f94c2f0ea 100755 --- a/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java +++ b/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java @@ -23,7 +23,6 @@ import org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAu import org.keycloak.authentication.authenticators.client.ClientAuthUtil; import org.keycloak.common.ClientConnection; import org.keycloak.common.util.Time; -import org.keycloak.credential.CredentialModel; import org.keycloak.events.Details; import org.keycloak.events.Errors; import org.keycloak.events.EventBuilder; diff --git a/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java b/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java index f79323443a..6781cea349 100755 --- a/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java +++ b/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java @@ -18,7 +18,6 @@ package org.keycloak.authentication; import org.jboss.resteasy.spi.HttpRequest; -import org.keycloak.OAuth2Constants; import org.keycloak.common.ClientConnection; import org.keycloak.common.util.Time; import org.keycloak.events.EventBuilder; diff --git a/services/src/main/java/org/keycloak/authentication/actiontoken/DefaultActionTokenKey.java b/services/src/main/java/org/keycloak/authentication/actiontoken/DefaultActionTokenKey.java index 96b817e2f0..d468dea55d 100644 --- a/services/src/main/java/org/keycloak/authentication/actiontoken/DefaultActionTokenKey.java +++ b/services/src/main/java/org/keycloak/authentication/actiontoken/DefaultActionTokenKey.java @@ -24,8 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.UUID; -import java.util.logging.Level; -import java.util.logging.Logger; import java.util.regex.Pattern; /** diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java index 3ed3dd7f90..b7106fb821 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java @@ -20,7 +20,6 @@ package org.keycloak.authentication.authenticators.broker; import org.keycloak.authentication.AuthenticationFlowContext; import org.keycloak.authentication.AuthenticationFlowError; import org.keycloak.authentication.AuthenticationFlowException; -import org.keycloak.authentication.AuthenticationProcessor; import org.keycloak.authentication.authenticators.broker.util.ExistingUserInfo; import org.keycloak.authentication.authenticators.broker.util.SerializedBrokeredIdentityContext; import org.keycloak.broker.provider.BrokeredIdentityContext; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java index fa8bdea102..c6a4967f46 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java @@ -37,7 +37,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; import org.keycloak.services.ServicesLogger; import org.keycloak.services.Urls; -import org.keycloak.services.managers.ClientSessionCode; import org.keycloak.services.messages.Messages; import org.keycloak.sessions.AuthenticationSessionCompoundId; import org.keycloak.sessions.AuthenticationSessionModel; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/ConditionalOtpFormAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/ConditionalOtpFormAuthenticator.java index f532f7a122..0ea9881618 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/ConditionalOtpFormAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/ConditionalOtpFormAuthenticator.java @@ -23,7 +23,6 @@ import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; -import org.keycloak.models.utils.RoleUtils; import javax.ws.rs.core.MultivaluedMap; import java.util.List; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/PasswordFormFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/PasswordFormFactory.java index c314f379fa..74b9caf1cb 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/PasswordFormFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/PasswordFormFactory.java @@ -23,7 +23,6 @@ import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.AuthenticatorFactory; import org.keycloak.authentication.DisplayTypeAuthenticatorFactory; import org.keycloak.authentication.authenticators.console.ConsolePasswordAuthenticator; -import org.keycloak.authentication.authenticators.console.ConsoleUsernamePasswordAuthenticator; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernameFormFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernameFormFactory.java index b6e0b49da5..75be8e7cd2 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernameFormFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernameFormFactory.java @@ -23,7 +23,6 @@ import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.AuthenticatorFactory; import org.keycloak.authentication.DisplayTypeAuthenticatorFactory; import org.keycloak.authentication.authenticators.console.ConsoleUsernameAuthenticator; -import org.keycloak.authentication.authenticators.console.ConsoleUsernamePasswordAuthenticator; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordFormFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordFormFactory.java index d7fc8393ac..fb28ca2a2f 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordFormFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordFormFactory.java @@ -26,7 +26,6 @@ import org.keycloak.authentication.authenticators.console.ConsoleUsernamePasswor import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.credential.PasswordCredentialModel; import org.keycloak.provider.ProviderConfigProperty; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticator.java index 81bf681348..e844625d73 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticator.java @@ -30,8 +30,6 @@ import org.keycloak.authentication.AuthenticationFlowError; import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.RequiredActionFactory; import org.keycloak.authentication.RequiredActionProvider; -import org.keycloak.authentication.requiredactions.UpdateTotp; -import org.keycloak.authentication.requiredactions.WebAuthnRegister; import org.keycloak.authentication.requiredactions.WebAuthnRegisterFactory; import org.keycloak.common.util.Base64Url; import org.keycloak.common.util.UriUtils; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticatorFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticatorFactory.java index ed2e8bde52..7e478e08db 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/WebAuthnAuthenticatorFactory.java @@ -17,7 +17,6 @@ package org.keycloak.authentication.authenticators.browser; import org.keycloak.Config; -import org.keycloak.WebAuthnConstants; import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.AuthenticatorFactory; import org.keycloak.models.AuthenticationExecutionModel; @@ -25,8 +24,6 @@ import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.provider.ProviderConfigProperty; -import java.util.Arrays; -import java.util.Collections; import java.util.List; public class WebAuthnAuthenticatorFactory implements AuthenticatorFactory { diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/challenge/NoCookieFlowRedirectAuthenticatorFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/challenge/NoCookieFlowRedirectAuthenticatorFactory.java index 843fd7fcf6..8738df3830 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/challenge/NoCookieFlowRedirectAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/challenge/NoCookieFlowRedirectAuthenticatorFactory.java @@ -25,7 +25,6 @@ import org.keycloak.authentication.AuthenticatorFactory; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.credential.PasswordCredentialModel; import org.keycloak.provider.ProviderConfigProperty; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticator.java index f0f0bf0e2e..09556a6c51 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticator.java @@ -24,7 +24,6 @@ import org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAu import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; -import org.keycloak.services.messages.Messages; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticatorFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticatorFactory.java index dc860ba4c2..619ae27e58 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/cli/CliUsernamePasswordAuthenticatorFactory.java @@ -20,11 +20,9 @@ package org.keycloak.authentication.authenticators.cli; import org.keycloak.Config; import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.AuthenticatorFactory; -import org.keycloak.authentication.authenticators.browser.UsernamePasswordForm; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.credential.PasswordCredentialModel; import org.keycloak.provider.ProviderConfigProperty; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleOTPFormAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleOTPFormAuthenticator.java index 28e2a08c32..a270633d39 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleOTPFormAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleOTPFormAuthenticator.java @@ -22,7 +22,6 @@ import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.ConsoleDisplayMode; import org.keycloak.authentication.authenticators.browser.OTPFormAuthenticator; import org.keycloak.models.credential.OTPCredentialModel; -import org.keycloak.representations.idm.CredentialRepresentation; import javax.ws.rs.core.Response; import java.net.URI; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleUsernamePasswordAuthenticatorFactory.java b/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleUsernamePasswordAuthenticatorFactory.java index 69ff517cd5..821ec02e96 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleUsernamePasswordAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/console/ConsoleUsernamePasswordAuthenticatorFactory.java @@ -23,7 +23,6 @@ import org.keycloak.authentication.AuthenticatorFactory; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.UserCredentialModel; import org.keycloak.models.credential.PasswordCredentialModel; import org.keycloak.provider.ProviderConfigProperty; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/directgrant/ValidatePassword.java b/services/src/main/java/org/keycloak/authentication/authenticators/directgrant/ValidatePassword.java index 833584f1a3..1248024d9d 100755 --- a/services/src/main/java/org/keycloak/authentication/authenticators/directgrant/ValidatePassword.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/directgrant/ValidatePassword.java @@ -19,9 +19,6 @@ package org.keycloak.authentication.authenticators.directgrant; import org.keycloak.authentication.AuthenticationFlowContext; import org.keycloak.authentication.AuthenticationFlowError; -import org.keycloak.authentication.CredentialValidator; -import org.keycloak.credential.CredentialProvider; -import org.keycloak.credential.PasswordCredentialProvider; import org.keycloak.events.Errors; import org.keycloak.models.AuthenticationExecutionModel; import org.keycloak.models.KeycloakSession; diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509ClientCertificateAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509ClientCertificateAuthenticator.java index 1aaaaf3dcc..2219d574b9 100644 --- a/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509ClientCertificateAuthenticator.java +++ b/services/src/main/java/org/keycloak/authentication/authenticators/x509/X509ClientCertificateAuthenticator.java @@ -31,9 +31,7 @@ import org.keycloak.authentication.AuthenticationFlowContext; import org.keycloak.authentication.authenticators.browser.AbstractUsernameFormAuthenticator; import org.keycloak.events.Details; import org.keycloak.events.Errors; -import org.keycloak.forms.login.LoginFormsPages; import org.keycloak.forms.login.LoginFormsProvider; -import org.keycloak.forms.login.freemarker.Templates; import org.keycloak.models.ModelDuplicateException; import org.keycloak.models.UserModel; import org.keycloak.models.utils.FormMessage; diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java index 924eff5227..25ff3e5b38 100755 --- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java +++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java @@ -36,7 +36,6 @@ import org.keycloak.models.utils.FormMessage; import org.keycloak.policy.PasswordPolicyManagerProvider; import org.keycloak.policy.PolicyError; import org.keycloak.provider.ProviderConfigProperty; -import org.keycloak.representations.idm.CredentialRepresentation; import org.keycloak.services.messages.Messages; import org.keycloak.services.validation.Validation; diff --git a/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateProfile.java b/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateProfile.java index 0b66beff51..5acd6d134e 100644 --- a/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateProfile.java +++ b/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateProfile.java @@ -17,25 +17,8 @@ package org.keycloak.authentication.requiredactions; -import org.keycloak.Config; import org.keycloak.authentication.RequiredActionContext; -import org.keycloak.authentication.RequiredActionFactory; import org.keycloak.authentication.RequiredActionProvider; -import org.keycloak.events.Details; -import org.keycloak.events.EventBuilder; -import org.keycloak.events.EventType; -import org.keycloak.models.KeycloakSession; -import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.models.RealmModel; -import org.keycloak.models.UserModel; -import org.keycloak.models.utils.FormMessage; -import org.keycloak.services.messages.Messages; -import org.keycloak.services.resources.AttributeFormDataProcessor; -import org.keycloak.services.validation.Validation; - -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.core.Response; -import java.util.List; /** * @author Bill Burke diff --git a/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateTotp.java b/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateTotp.java index 45feb6fee0..0b4e57dbb7 100644 --- a/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateTotp.java +++ b/services/src/main/java/org/keycloak/authentication/requiredactions/ConsoleUpdateTotp.java @@ -17,7 +17,6 @@ package org.keycloak.authentication.requiredactions; -import com.fasterxml.jackson.core.JsonProcessingException; import org.keycloak.authentication.RequiredActionContext; import org.keycloak.authentication.RequiredActionProvider; import org.keycloak.authentication.ConsoleDisplayMode; diff --git a/services/src/main/java/org/keycloak/authentication/requiredactions/UpdateTotp.java b/services/src/main/java/org/keycloak/authentication/requiredactions/UpdateTotp.java index f065842975..14d4b1ad21 100644 --- a/services/src/main/java/org/keycloak/authentication/requiredactions/UpdateTotp.java +++ b/services/src/main/java/org/keycloak/authentication/requiredactions/UpdateTotp.java @@ -17,7 +17,6 @@ package org.keycloak.authentication.requiredactions; -import com.fasterxml.jackson.core.JsonProcessingException; import org.keycloak.Config; import org.keycloak.OAuth2Constants; import org.keycloak.authentication.*; diff --git a/services/src/main/java/org/keycloak/authorization/admin/PolicyResourceService.java b/services/src/main/java/org/keycloak/authorization/admin/PolicyResourceService.java index 6ee162cbd6..377436cf90 100644 --- a/services/src/main/java/org/keycloak/authorization/admin/PolicyResourceService.java +++ b/services/src/main/java/org/keycloak/authorization/admin/PolicyResourceService.java @@ -26,10 +26,8 @@ import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; import org.jboss.resteasy.annotations.cache.NoCache; import org.keycloak.authorization.AuthorizationProvider; diff --git a/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java b/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java index 6b2897a9eb..60a984841a 100644 --- a/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java +++ b/services/src/main/java/org/keycloak/authorization/admin/PolicyService.java @@ -18,14 +18,10 @@ package org.keycloak.authorization.admin; import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.Function; import java.util.stream.Collectors; import javax.ws.rs.Consumes; @@ -39,7 +35,6 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; import org.jboss.resteasy.annotations.cache.NoCache; import org.jboss.resteasy.spi.ResteasyProviderFactory; diff --git a/services/src/main/java/org/keycloak/authorization/admin/PolicyTypeResourceService.java b/services/src/main/java/org/keycloak/authorization/admin/PolicyTypeResourceService.java index f4afc4539a..f6eef35269 100644 --- a/services/src/main/java/org/keycloak/authorization/admin/PolicyTypeResourceService.java +++ b/services/src/main/java/org/keycloak/authorization/admin/PolicyTypeResourceService.java @@ -21,8 +21,6 @@ import java.io.IOException; import org.keycloak.authorization.AuthorizationProvider; import org.keycloak.authorization.model.Policy; import org.keycloak.authorization.model.ResourceServer; -import org.keycloak.authorization.policy.provider.PolicyProviderFactory; -import org.keycloak.common.util.reflections.Types; import org.keycloak.models.utils.ModelToRepresentation; import org.keycloak.representations.idm.authorization.AbstractPolicyRepresentation; import org.keycloak.services.resources.admin.permissions.AdminPermissionEvaluator; diff --git a/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java b/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java index b9ce827145..37154e5ff3 100644 --- a/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java +++ b/services/src/main/java/org/keycloak/authorization/authorization/AuthorizationTokenService.java @@ -16,7 +16,6 @@ */ package org.keycloak.authorization.authorization; -import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -38,7 +37,6 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import org.apache.http.HttpStatus; import org.jboss.logging.Logger; import org.jboss.resteasy.spi.HttpRequest; import org.keycloak.OAuthErrorException; diff --git a/services/src/main/java/org/keycloak/authorization/common/ClientModelIdentity.java b/services/src/main/java/org/keycloak/authorization/common/ClientModelIdentity.java index f499a018f6..3b933e5f5b 100644 --- a/services/src/main/java/org/keycloak/authorization/common/ClientModelIdentity.java +++ b/services/src/main/java/org/keycloak/authorization/common/ClientModelIdentity.java @@ -25,8 +25,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; -import java.util.Map; - /** * @author Bill Burke * @version $Revision: 1 $ diff --git a/services/src/main/java/org/keycloak/authorization/common/KeycloakIdentity.java b/services/src/main/java/org/keycloak/authorization/common/KeycloakIdentity.java index 3eb445444b..57c1b55b33 100644 --- a/services/src/main/java/org/keycloak/authorization/common/KeycloakIdentity.java +++ b/services/src/main/java/org/keycloak/authorization/common/KeycloakIdentity.java @@ -19,17 +19,14 @@ package org.keycloak.authorization.common; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import org.keycloak.OAuth2Constants; import org.keycloak.authorization.attribute.Attributes; import org.keycloak.authorization.identity.Identity; import org.keycloak.authorization.util.Tokens; import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientModel; -import org.keycloak.models.ClientScopeModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; -import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; import org.keycloak.models.UserSessionModel; import org.keycloak.models.UserSessionProvider; @@ -45,11 +42,9 @@ import javax.ws.rs.core.Response.Status; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; /** * @author Pedro Igor diff --git a/services/src/main/java/org/keycloak/authorization/common/UserModelIdentity.java b/services/src/main/java/org/keycloak/authorization/common/UserModelIdentity.java index 2726913b20..f8e1cd38ce 100644 --- a/services/src/main/java/org/keycloak/authorization/common/UserModelIdentity.java +++ b/services/src/main/java/org/keycloak/authorization/common/UserModelIdentity.java @@ -23,7 +23,6 @@ import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; import org.keycloak.models.UserModel; -import java.util.Collection; import java.util.Map; /** diff --git a/services/src/main/java/org/keycloak/authorization/config/UmaConfiguration.java b/services/src/main/java/org/keycloak/authorization/config/UmaConfiguration.java index f622dc4ad8..d2754b8ae9 100644 --- a/services/src/main/java/org/keycloak/authorization/config/UmaConfiguration.java +++ b/services/src/main/java/org/keycloak/authorization/config/UmaConfiguration.java @@ -17,8 +17,6 @@ */ package org.keycloak.authorization.config; -import java.net.URI; - import javax.ws.rs.core.UriBuilder; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/services/src/main/java/org/keycloak/authorization/protection/permission/AbstractPermissionService.java b/services/src/main/java/org/keycloak/authorization/protection/permission/AbstractPermissionService.java index 8efc2637cf..6e38315954 100644 --- a/services/src/main/java/org/keycloak/authorization/protection/permission/AbstractPermissionService.java +++ b/services/src/main/java/org/keycloak/authorization/protection/permission/AbstractPermissionService.java @@ -22,8 +22,6 @@ import org.keycloak.authorization.model.Resource; import org.keycloak.authorization.model.ResourceServer; import org.keycloak.authorization.model.Scope; import org.keycloak.authorization.store.ResourceStore; -import org.keycloak.models.ClientModel; -import org.keycloak.models.TokenManager; import org.keycloak.representations.idm.authorization.Permission; import org.keycloak.representations.idm.authorization.PermissionRequest; import org.keycloak.representations.idm.authorization.PermissionResponse; diff --git a/services/src/main/java/org/keycloak/authorization/protection/resource/ResourceService.java b/services/src/main/java/org/keycloak/authorization/protection/resource/ResourceService.java index de83a61d6b..1df9b2926a 100644 --- a/services/src/main/java/org/keycloak/authorization/protection/resource/ResourceService.java +++ b/services/src/main/java/org/keycloak/authorization/protection/resource/ResourceService.java @@ -28,10 +28,8 @@ 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.Response; import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; import org.jboss.resteasy.annotations.cache.NoCache; import org.keycloak.authorization.admin.ResourceSetService; diff --git a/services/src/main/java/org/keycloak/authorization/util/Permissions.java b/services/src/main/java/org/keycloak/authorization/util/Permissions.java index fd9a440b3d..bf82d2dae6 100644 --- a/services/src/main/java/org/keycloak/authorization/util/Permissions.java +++ b/services/src/main/java/org/keycloak/authorization/util/Permissions.java @@ -22,7 +22,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; diff --git a/services/src/main/java/org/keycloak/authorization/util/Tokens.java b/services/src/main/java/org/keycloak/authorization/util/Tokens.java index e76299ec68..5ca43f2a7d 100644 --- a/services/src/main/java/org/keycloak/authorization/util/Tokens.java +++ b/services/src/main/java/org/keycloak/authorization/util/Tokens.java @@ -18,16 +18,12 @@ package org.keycloak.authorization.util; -import org.keycloak.jose.jws.JWSInput; import org.keycloak.models.KeycloakContext; import org.keycloak.models.KeycloakSession; import org.keycloak.representations.AccessToken; -import org.keycloak.services.ErrorResponseException; import org.keycloak.services.managers.AppAuthManager; import org.keycloak.services.managers.AuthenticationManager.AuthResult; -import javax.ws.rs.core.Response.Status; - /** * @author Pedro Igor */