diff --git a/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java b/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java index 22cfff1433..33f751c60d 100755 --- a/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java +++ b/services/src/main/java/org/keycloak/exportimport/util/ExportUtils.java @@ -41,7 +41,6 @@ import org.keycloak.authorization.model.Scope; import org.keycloak.authorization.store.PolicyStore; import org.keycloak.authorization.store.StoreFactory; import org.keycloak.common.Version; -import org.keycloak.common.util.Base64; import org.keycloak.common.util.MultivaluedHashMap; import org.keycloak.component.ComponentModel; import org.keycloak.credential.CredentialModel; diff --git a/services/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java b/services/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java index 2d68f49515..b197d4e450 100755 --- a/services/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java +++ b/services/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java @@ -41,7 +41,6 @@ import org.keycloak.theme.BrowserSecurityHeaderSetup; import org.keycloak.theme.FreeMarkerException; import org.keycloak.theme.FreeMarkerUtil; import org.keycloak.theme.Theme; -import org.keycloak.theme.ThemeProvider; import org.keycloak.theme.beans.AdvancedMessageFormatterMethod; import org.keycloak.theme.beans.LocaleBean; import org.keycloak.theme.beans.MessageBean; diff --git a/services/src/main/java/org/keycloak/forms/login/freemarker/model/ClientBean.java b/services/src/main/java/org/keycloak/forms/login/freemarker/model/ClientBean.java index 56a2f47aa4..f8d239d635 100755 --- a/services/src/main/java/org/keycloak/forms/login/freemarker/model/ClientBean.java +++ b/services/src/main/java/org/keycloak/forms/login/freemarker/model/ClientBean.java @@ -21,7 +21,6 @@ import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; import org.keycloak.services.util.ResolveRelative; -import java.net.URI; import java.util.Map; /** diff --git a/services/src/main/java/org/keycloak/forms/login/freemarker/model/OAuthGrantBean.java b/services/src/main/java/org/keycloak/forms/login/freemarker/model/OAuthGrantBean.java index 4c5d9d5cea..8345bb6328 100755 --- a/services/src/main/java/org/keycloak/forms/login/freemarker/model/OAuthGrantBean.java +++ b/services/src/main/java/org/keycloak/forms/login/freemarker/model/OAuthGrantBean.java @@ -21,10 +21,7 @@ import org.keycloak.models.ClientScopeModel; import org.keycloak.models.OrderedModel; import java.util.ArrayList; -import java.util.LinkedList; import java.util.List; -import java.util.Set; -import java.util.TreeSet; /** * @author Viliam Rockai diff --git a/services/src/main/java/org/keycloak/forms/login/freemarker/model/TotpBean.java b/services/src/main/java/org/keycloak/forms/login/freemarker/model/TotpBean.java index 2b67bf1c61..eab4fc9fc6 100755 --- a/services/src/main/java/org/keycloak/forms/login/freemarker/model/TotpBean.java +++ b/services/src/main/java/org/keycloak/forms/login/freemarker/model/TotpBean.java @@ -16,7 +16,6 @@ */ package org.keycloak.forms.login.freemarker.model; -import org.keycloak.credential.CredentialModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.OTPPolicy; import org.keycloak.models.RealmModel; diff --git a/services/src/main/java/org/keycloak/jose/jws/DefaultTokenManager.java b/services/src/main/java/org/keycloak/jose/jws/DefaultTokenManager.java index 651af64db8..e99d4868c1 100644 --- a/services/src/main/java/org/keycloak/jose/jws/DefaultTokenManager.java +++ b/services/src/main/java/org/keycloak/jose/jws/DefaultTokenManager.java @@ -18,8 +18,6 @@ package org.keycloak.jose.jws; import java.io.UnsupportedEncodingException; import java.security.Key; -import java.util.LinkedList; -import java.util.List; import org.jboss.logging.Logger; import org.keycloak.Token; @@ -32,7 +30,6 @@ import org.keycloak.crypto.KeyUse; import org.keycloak.crypto.KeyWrapper; import org.keycloak.crypto.SignatureProvider; import org.keycloak.crypto.SignatureSignerContext; -import org.keycloak.jose.jwe.JWEConstants; import org.keycloak.jose.jwe.JWEException; import org.keycloak.jose.jwe.alg.JWEAlgorithmProvider; import org.keycloak.jose.jwe.enc.JWEEncryptionProvider; diff --git a/services/src/main/java/org/keycloak/partialimport/PartialImportManager.java b/services/src/main/java/org/keycloak/partialimport/PartialImportManager.java index 41b9d92ce6..f119c7cb34 100644 --- a/services/src/main/java/org/keycloak/partialimport/PartialImportManager.java +++ b/services/src/main/java/org/keycloak/partialimport/PartialImportManager.java @@ -19,7 +19,6 @@ package org.keycloak.partialimport; import org.keycloak.events.admin.OperationType; import org.keycloak.models.KeycloakSession; -import org.keycloak.models.ModelDuplicateException; import org.keycloak.models.ModelException; import org.keycloak.models.RealmModel; import org.keycloak.representations.idm.PartialImportRepresentation; diff --git a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2Protocol.java b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2Protocol.java index c7a7da88a8..0207f525ca 100644 --- a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2Protocol.java +++ b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2Protocol.java @@ -21,7 +21,6 @@ import org.keycloak.protocol.docker.mapper.DockerAuthV2AttributeMapper; import org.keycloak.representations.docker.DockerResponse; import org.keycloak.representations.docker.DockerResponseToken; import org.keycloak.services.ErrorResponseException; -import org.keycloak.services.managers.ClientSessionCode; import org.keycloak.sessions.AuthenticationSessionModel; import org.keycloak.util.TokenUtil; @@ -32,7 +31,6 @@ import javax.ws.rs.core.UriInfo; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; -import java.util.Set; public class DockerAuthV2Protocol implements LoginProtocol { protected static final Logger logger = Logger.getLogger(DockerEndpoint.class); diff --git a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2ProtocolFactory.java b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2ProtocolFactory.java index f721760c92..92888817ef 100644 --- a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2ProtocolFactory.java +++ b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthV2ProtocolFactory.java @@ -3,7 +3,6 @@ package org.keycloak.protocol.docker; import org.keycloak.common.Profile; import org.keycloak.events.EventBuilder; import org.keycloak.models.ClientModel; -import org.keycloak.models.ClientScopeModel; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; @@ -12,7 +11,6 @@ import org.keycloak.protocol.LoginProtocol; import org.keycloak.protocol.docker.mapper.AllowAllDockerProtocolMapper; import org.keycloak.provider.EnvironmentDependentProviderFactory; import org.keycloak.representations.idm.ClientRepresentation; -import org.keycloak.representations.idm.ClientScopeRepresentation; import java.util.ArrayList; import java.util.Collections; diff --git a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthenticatorFactory.java b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthenticatorFactory.java index 9bba9c490c..01453a8423 100644 --- a/services/src/main/java/org/keycloak/protocol/docker/DockerAuthenticatorFactory.java +++ b/services/src/main/java/org/keycloak/protocol/docker/DockerAuthenticatorFactory.java @@ -3,10 +3,8 @@ package org.keycloak.protocol.docker; import org.keycloak.Config; import org.keycloak.authentication.Authenticator; import org.keycloak.authentication.AuthenticatorFactory; -import org.keycloak.common.Profile; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; -import org.keycloak.provider.EnvironmentDependentProviderFactory; import org.keycloak.provider.ProviderConfigProperty; import java.util.Collections; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenIntrospectionEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenIntrospectionEndpoint.java index 80d8ccdb13..00f1e7abc3 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenIntrospectionEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/TokenIntrospectionEndpoint.java @@ -36,7 +36,6 @@ import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; -import javax.ws.rs.core.UriInfo; /** * A token introspection endpoint based on RFC-7662. diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/UserInfoEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/UserInfoEndpoint.java index b8eded5eea..b0c9183145 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/UserInfoEndpoint.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/UserInfoEndpoint.java @@ -35,7 +35,6 @@ import org.keycloak.jose.jws.JWSBuilder; import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionContext; -import org.keycloak.models.TokenManager; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/request/AuthzEndpointRequestObjectParser.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/request/AuthzEndpointRequestObjectParser.java index 42544db5f8..8b0ce56bdd 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/request/AuthzEndpointRequestObjectParser.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/request/AuthzEndpointRequestObjectParser.java @@ -21,8 +21,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Set; -import org.keycloak.crypto.SignatureProvider; -import org.keycloak.crypto.SignatureVerifierContext; import org.keycloak.jose.jws.Algorithm; import org.keycloak.jose.jws.JWSHeader; import org.keycloak.jose.jws.JWSInput; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/installation/KeycloakOIDCClientInstallation.java b/services/src/main/java/org/keycloak/protocol/oidc/installation/KeycloakOIDCClientInstallation.java index 2cbd5cce96..561a4e225a 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/installation/KeycloakOIDCClientInstallation.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/installation/KeycloakOIDCClientInstallation.java @@ -29,7 +29,6 @@ import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.models.RealmModel; import org.keycloak.models.RoleModel; -import org.keycloak.models.utils.KeycloakModelUtils; import org.keycloak.protocol.ClientInstallationProvider; import org.keycloak.protocol.oidc.OIDCLoginProtocol; import org.keycloak.protocol.oidc.mappers.AudienceProtocolMapper; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractPairwiseSubMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractPairwiseSubMapper.java index fdc3433a67..ef3b9bdcf1 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractPairwiseSubMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AbstractPairwiseSubMapper.java @@ -1,6 +1,5 @@ package org.keycloak.protocol.oidc.mappers; -import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AllowedWebOriginsProtocolMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AllowedWebOriginsProtocolMapper.java index f3a042add3..2ffe70cc6d 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/AllowedWebOriginsProtocolMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/AllowedWebOriginsProtocolMapper.java @@ -22,8 +22,6 @@ import java.util.Collections; import java.util.List; import java.util.Set; -import javax.ws.rs.core.UriInfo; - import org.keycloak.models.ClientModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAccessTokenMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAccessTokenMapper.java index ff11ab937c..8997e86daf 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAccessTokenMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAccessTokenMapper.java @@ -17,7 +17,6 @@ package org.keycloak.protocol.oidc.mappers; -import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ProtocolMapperModel; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAttributeMapperHelper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAttributeMapperHelper.java index ea21cf65d9..8e9990f68b 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAttributeMapperHelper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCAttributeMapperHelper.java @@ -18,7 +18,6 @@ package org.keycloak.protocol.oidc.mappers; import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; import org.keycloak.models.ProtocolMapperModel; import org.keycloak.protocol.ProtocolMapper; import org.keycloak.protocol.ProtocolMapperUtils; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCIDTokenMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCIDTokenMapper.java index a69f1dbd3a..926795e321 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCIDTokenMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/OIDCIDTokenMapper.java @@ -17,7 +17,6 @@ package org.keycloak.protocol.oidc.mappers; -import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ProtocolMapperModel; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/mappers/UserInfoTokenMapper.java b/services/src/main/java/org/keycloak/protocol/oidc/mappers/UserInfoTokenMapper.java index d3f80cb586..1cfb528d83 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/mappers/UserInfoTokenMapper.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/mappers/UserInfoTokenMapper.java @@ -17,7 +17,6 @@ package org.keycloak.protocol.oidc.mappers; -import org.keycloak.models.AuthenticatedClientSessionModel; import org.keycloak.models.ClientSessionContext; import org.keycloak.models.KeycloakSession; import org.keycloak.models.ProtocolMapperModel; diff --git a/services/src/main/java/org/keycloak/protocol/oidc/utils/JWKSHttpUtils.java b/services/src/main/java/org/keycloak/protocol/oidc/utils/JWKSHttpUtils.java index 803ddcabf3..dabe955afc 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/utils/JWKSHttpUtils.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/utils/JWKSHttpUtils.java @@ -20,14 +20,11 @@ package org.keycloak.protocol.oidc.utils; import org.keycloak.common.util.StreamUtil; import org.keycloak.connections.httpclient.HttpClientProvider; import org.keycloak.jose.jwk.JSONWebKeySet; -import org.keycloak.jose.jwk.JWK; -import org.keycloak.jose.jwk.JWKParser; import org.keycloak.models.KeycloakSession; import org.keycloak.util.JsonSerialization; import java.io.IOException; import java.io.InputStream; -import java.security.PublicKey; /** * diff --git a/services/src/main/java/org/keycloak/protocol/oidc/utils/WebOriginsUtils.java b/services/src/main/java/org/keycloak/protocol/oidc/utils/WebOriginsUtils.java index 380019fb06..aa23208ae3 100644 --- a/services/src/main/java/org/keycloak/protocol/oidc/utils/WebOriginsUtils.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/utils/WebOriginsUtils.java @@ -21,7 +21,6 @@ import org.keycloak.common.util.UriUtils; import org.keycloak.models.ClientModel; import org.keycloak.models.KeycloakSession; -import javax.ws.rs.core.UriInfo; import java.util.HashSet; import java.util.Set; diff --git a/services/src/main/java/org/keycloak/protocol/openshift/OpenShiftTokenReviewResponseRepresentation.java b/services/src/main/java/org/keycloak/protocol/openshift/OpenShiftTokenReviewResponseRepresentation.java index 47918d2a32..63422aa30a 100755 --- a/services/src/main/java/org/keycloak/protocol/openshift/OpenShiftTokenReviewResponseRepresentation.java +++ b/services/src/main/java/org/keycloak/protocol/openshift/OpenShiftTokenReviewResponseRepresentation.java @@ -20,7 +20,6 @@ package org.keycloak.protocol.openshift; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; -import java.util.HashSet; import java.util.LinkedList; import java.util.List; diff --git a/services/src/main/java/org/keycloak/protocol/saml/clientregistration/EntityDescriptorClientRegistrationProvider.java b/services/src/main/java/org/keycloak/protocol/saml/clientregistration/EntityDescriptorClientRegistrationProvider.java index 66047130a1..5a284468fc 100755 --- a/services/src/main/java/org/keycloak/protocol/saml/clientregistration/EntityDescriptorClientRegistrationProvider.java +++ b/services/src/main/java/org/keycloak/protocol/saml/clientregistration/EntityDescriptorClientRegistrationProvider.java @@ -22,7 +22,6 @@ import org.keycloak.models.KeycloakSession; import org.keycloak.protocol.saml.EntityDescriptorDescriptionConverter; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.services.clientregistration.AbstractClientRegistrationProvider; -import org.keycloak.services.clientregistration.DefaultClientRegistrationContext; import javax.ws.rs.Consumes; import javax.ws.rs.POST;