[KEYCLOAK-19564] - Avoid split packages in Dist.X

This commit is contained in:
Pedro Igor 2021-10-15 18:37:53 -03:00
parent ecb1bfa69a
commit b4c837f148
74 changed files with 339 additions and 255 deletions

View file

@ -17,15 +17,15 @@
package org.keycloak.quarkus.deployment;
import static org.keycloak.configuration.Configuration.getPropertyNames;
import static org.keycloak.connections.jpa.QuarkusJpaConnectionProviderFactory.QUERY_PROPERTY_PREFIX;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getPropertyNames;
import static org.keycloak.quarkus.runtime.storage.database.jpa.QuarkusJpaConnectionProviderFactory.QUERY_PROPERTY_PREFIX;
import static org.keycloak.connections.jpa.util.JpaUtils.loadSpecificNamedQueries;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_KEYCLOAK;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_KEYCLOAK;
import static org.keycloak.representations.provider.ScriptProviderDescriptor.AUTHENTICATORS;
import static org.keycloak.representations.provider.ScriptProviderDescriptor.MAPPERS;
import static org.keycloak.representations.provider.ScriptProviderDescriptor.POLICIES;
import static org.keycloak.util.Environment.CLI_ARGS;
import static org.keycloak.util.Environment.getProviderFiles;
import static org.keycloak.quarkus.runtime.Environment.CLI_ARGS;
import static org.keycloak.quarkus.runtime.Environment.getProviderFiles;
import javax.persistence.Entity;
import javax.persistence.spi.PersistenceUnitTransactionType;
@ -77,16 +77,16 @@ import org.jboss.logging.Logger;
import org.jboss.resteasy.plugins.server.servlet.ResteasyContextParameters;
import org.jboss.resteasy.spi.ResteasyDeployment;
import org.keycloak.Config;
import org.keycloak.QuarkusKeycloakApplication;
import org.keycloak.quarkus.runtime.integration.jaxrs.QuarkusKeycloakApplication;
import org.keycloak.authentication.AuthenticatorSpi;
import org.keycloak.authentication.authenticators.browser.DeployedScriptAuthenticatorFactory;
import org.keycloak.authorization.policy.provider.PolicySpi;
import org.keycloak.authorization.policy.provider.js.DeployedScriptPolicyFactory;
import org.keycloak.common.Profile;
import org.keycloak.common.util.StreamUtil;
import org.keycloak.configuration.Configuration;
import org.keycloak.configuration.KeycloakConfigSourceProvider;
import org.keycloak.configuration.MicroProfileConfigProvider;
import org.keycloak.quarkus.runtime.configuration.Configuration;
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
import org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider;
import org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory;
import org.keycloak.connections.jpa.updater.liquibase.LiquibaseJpaUpdaterProviderFactory;
import org.keycloak.connections.jpa.updater.liquibase.conn.DefaultLiquibaseConnectionProvider;
@ -98,9 +98,9 @@ import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.provider.ProviderManager;
import org.keycloak.provider.Spi;
import org.keycloak.provider.quarkus.QuarkusRequestFilter;
import org.keycloak.provider.quarkus.dev.QuarkusDevRequestFilter;
import org.keycloak.quarkus.KeycloakRecorder;
import org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter;
import org.keycloak.quarkus.runtime.dev.QuarkusDevRequestFilter;
import org.keycloak.quarkus.runtime.KeycloakRecorder;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
@ -110,11 +110,11 @@ import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.vertx.http.deployment.FilterBuildItem;
import org.keycloak.representations.provider.ScriptProviderDescriptor;
import org.keycloak.representations.provider.ScriptProviderMetadata;
import org.keycloak.services.NotFoundHandler;
import org.keycloak.quarkus.runtime.integration.web.NotFoundHandler;
import org.keycloak.services.ServicesLogger;
import org.keycloak.services.health.KeycloakMetricsHandler;
import org.keycloak.quarkus.runtime.services.health.KeycloakMetricsHandler;
import org.keycloak.transaction.JBossJtaTransactionManagerLookup;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import org.keycloak.util.JsonSerialization;
class KeycloakProcessor {
@ -251,7 +251,7 @@ class KeycloakProcessor {
* <p>Make the build time configuration available at runtime so that the server can run without having to specify some of
* the properties again.
*
* <p>This build step also adds a static call to {@link org.keycloak.cli.ShowConfigCommand#run} via the recorder
* <p>This build step also adds a static call to {@link org.keycloak.quarkus.runtime.cli.ShowConfigCommand#run} via the recorder
* so that the configuration can be shown when requested.
*
* @param recorder the recorder
@ -327,7 +327,7 @@ class KeycloakProcessor {
* running in a different thread than the worker thread started by {@link QuarkusRequestFilter}.
* See https://github.com/quarkusio/quarkus/issues/12990.
*
* <p>By doing this, custom health checks such as {@link org.keycloak.services.health.KeycloakReadyHealthCheck} is
* <p>By doing this, custom health checks such as {@link org.keycloak.quarkus.runtime.services.health.KeycloakReadyHealthCheck} is
* executed within an active {@link org.keycloak.models.KeycloakSession}, making possible to use it when calculating the
* status.
*

View file

@ -17,7 +17,7 @@ import org.jboss.jandex.IndexView;
import org.keycloak.connections.jpa.updater.liquibase.lock.CustomInsertLockRecordGenerator;
import org.keycloak.connections.jpa.updater.liquibase.lock.CustomLockDatabaseChangeLogGenerator;
import org.keycloak.connections.jpa.updater.liquibase.lock.DummyLockService;
import org.keycloak.connections.liquibase.KeycloakLogger;
import org.keycloak.quarkus.runtime.storage.database.liquibase.KeycloakLogger;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
@ -29,7 +29,7 @@ import liquibase.parser.ChangeLogParser;
import liquibase.parser.core.xml.XMLChangeLogSAXParser;
import liquibase.servicelocator.LiquibaseService;
import liquibase.sqlgenerator.SqlGenerator;
import org.keycloak.quarkus.KeycloakRecorder;
import org.keycloak.quarkus.runtime.KeycloakRecorder;
class LiquibaseProcessor {
@ -88,7 +88,7 @@ class LiquibaseProcessor {
private void filterImplementations(Class<?> types, Set<ClassInfo> classes) {
if (Database.class.equals(types)) {
// removes unsupported databases
classes.removeIf(classInfo -> !org.keycloak.configuration.Database.isSupported(classInfo.name().toString()));
classes.removeIf(classInfo -> !org.keycloak.quarkus.runtime.storage.database.Database.isSupported(classInfo.name().toString()));
}
}
}

View file

@ -18,7 +18,7 @@
package org.keycloak.quarkus.deployment;
import java.util.function.BooleanSupplier;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
public class isReAugmentation implements BooleanSupplier {

View file

@ -1,20 +0,0 @@
package org.keycloak.provider.quarkus.dev;
import io.vertx.ext.web.RoutingContext;
import org.keycloak.provider.quarkus.QuarkusRequestFilter;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class QuarkusDevRequestFilter extends QuarkusRequestFilter {
@Override
public void handle(RoutingContext context) {
if (context.request().uri().startsWith("/q/")) {
// do not go through Keycloak request filter if serving Quarkus resources such as dev console
context.next();
return;
}
super.handle(context);
}
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.util;
package org.keycloak.quarkus.runtime;
import java.io.File;
import java.io.FilenameFilter;
@ -31,7 +31,7 @@ import java.util.stream.Collectors;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ProfileManager;
import org.apache.commons.lang3.SystemUtils;
import org.keycloak.configuration.Configuration;
import org.keycloak.quarkus.runtime.configuration.Configuration;
public final class Environment {

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -13,10 +13,9 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime;
/**
* Exception thrown when some error happens during initialization of Quarkus platform. Usually due the incorrect configuration of basic stuff (DB, HTTP protocol etc)

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,11 +15,11 @@
* limitations under the License.
*/
package org.keycloak;
package org.keycloak.quarkus.runtime;
import static org.keycloak.cli.Picocli.error;
import static org.keycloak.cli.Picocli.parseAndRun;
import static org.keycloak.util.Environment.getProfileOrDefault;
import static org.keycloak.quarkus.runtime.cli.Picocli.error;
import static org.keycloak.quarkus.runtime.cli.Picocli.parseAndRun;
import static org.keycloak.quarkus.runtime.Environment.getProfileOrDefault;
import java.io.PrintWriter;
import java.util.ArrayList;
@ -29,14 +29,12 @@ import java.util.List;
import io.quarkus.runtime.ApplicationLifecycleManager;
import io.quarkus.runtime.Quarkus;
import org.keycloak.cli.Picocli;
import org.keycloak.quarkus.runtime.cli.Picocli;
import org.keycloak.common.Version;
import io.quarkus.runtime.QuarkusApplication;
import io.quarkus.runtime.annotations.QuarkusMain;
import org.keycloak.util.Environment;
/**
* <p>The main entry point, responsible for initialize and run the CLI as well as start the server.
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,19 +15,19 @@
* limitations under the License.
*/
package org.keycloak.quarkus;
package org.keycloak.quarkus.runtime;
import static org.keycloak.configuration.Configuration.getBuiltTimeProperty;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getBuiltTimeProperty;
import java.util.List;
import java.util.Map;
import org.jboss.logging.Logger;
import org.keycloak.QuarkusKeycloakSessionFactory;
import org.keycloak.common.Profile;
import org.keycloak.configuration.Configuration;
import org.keycloak.connections.liquibase.FastServiceLocator;
import org.keycloak.connections.liquibase.KeycloakLogger;
import org.keycloak.quarkus.runtime.configuration.Configuration;
import org.keycloak.quarkus.runtime.integration.QuarkusKeycloakSessionFactory;
import org.keycloak.quarkus.runtime.storage.database.liquibase.FastServiceLocator;
import org.keycloak.quarkus.runtime.storage.database.liquibase.KeycloakLogger;
import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.provider.Spi;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli;
package org.keycloak.quarkus.runtime.cli;
import picocli.CommandLine;

View file

@ -15,13 +15,13 @@
* limitations under the License.
*/
package org.keycloak.cli;
package org.keycloak.quarkus.runtime.cli;
import static java.util.Arrays.asList;
import static org.keycloak.cli.command.AbstractStartCommand.AUTO_BUILD_OPTION;
import static org.keycloak.configuration.Configuration.getConfig;
import static org.keycloak.configuration.PropertyMappers.isBuildTimeProperty;
import static org.keycloak.util.Environment.isDevMode;
import static org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.AUTO_BUILD_OPTION;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getConfig;
import static org.keycloak.quarkus.runtime.configuration.PropertyMappers.isBuildTimeProperty;
import static org.keycloak.quarkus.runtime.Environment.isDevMode;
import static picocli.CommandLine.Model.UsageMessageSpec.SECTION_KEY_COMMAND_LIST;
import java.io.File;
@ -41,18 +41,18 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.jboss.logging.Logger;
import org.keycloak.cli.command.Build;
import org.keycloak.cli.command.Main;
import org.keycloak.cli.command.Start;
import org.keycloak.cli.command.StartDev;
import org.keycloak.quarkus.runtime.cli.command.Build;
import org.keycloak.quarkus.runtime.cli.command.Main;
import org.keycloak.quarkus.runtime.cli.command.Start;
import org.keycloak.quarkus.runtime.cli.command.StartDev;
import org.keycloak.common.Profile;
import org.keycloak.configuration.KeycloakConfigSourceProvider;
import org.keycloak.configuration.PropertyMapper;
import org.keycloak.configuration.PropertyMappers;
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
import org.keycloak.quarkus.runtime.configuration.PropertyMapper;
import org.keycloak.quarkus.runtime.configuration.PropertyMappers;
import org.keycloak.platform.Platform;
import org.keycloak.provider.quarkus.InitializationException;
import org.keycloak.provider.quarkus.QuarkusPlatform;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.InitializationException;
import org.keycloak.quarkus.runtime.integration.QuarkusPlatform;
import org.keycloak.quarkus.runtime.Environment;
import picocli.CommandLine;
public final class Picocli {

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli;
package org.keycloak.quarkus.runtime.cli;
import java.util.Collection;
import java.util.Map;

View file

@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import picocli.CommandLine;

View file

@ -15,11 +15,11 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import static org.keycloak.cli.Picocli.error;
import static org.keycloak.quarkus.runtime.cli.Picocli.error;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import picocli.CommandLine;

View file

@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import org.keycloak.KeycloakMain;
import org.keycloak.quarkus.runtime.KeycloakMain;
import picocli.CommandLine;

View file

@ -15,12 +15,12 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import static org.keycloak.cli.Picocli.error;
import static org.keycloak.cli.Picocli.println;
import static org.keycloak.quarkus.runtime.cli.Picocli.error;
import static org.keycloak.quarkus.runtime.cli.Picocli.println;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import io.quarkus.bootstrap.runner.QuarkusEntryPoint;
import io.quarkus.bootstrap.runner.RunnerClassLoader;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import picocli.AutoComplete;
import picocli.CommandLine;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import static org.keycloak.exportimport.ExportImportConfig.ACTION_EXPORT;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import static org.keycloak.exportimport.ExportImportConfig.ACTION_IMPORT;
import static org.keycloak.exportimport.Strategy.IGNORE_EXISTING;

View file

@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import org.keycloak.configuration.KeycloakConfigSourceProvider;
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
import picocli.CommandLine;
import picocli.CommandLine.Command;

View file

@ -15,14 +15,14 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import static java.lang.Boolean.parseBoolean;
import static org.keycloak.configuration.Configuration.getConfigValue;
import static org.keycloak.configuration.Configuration.getPropertyNames;
import static org.keycloak.configuration.PropertyMappers.canonicalFormat;
import static org.keycloak.configuration.PropertyMappers.formatValue;
import static org.keycloak.util.Environment.getBuiltTimeProperty;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getConfigValue;
import static org.keycloak.quarkus.runtime.configuration.Configuration.getPropertyNames;
import static org.keycloak.quarkus.runtime.configuration.PropertyMappers.canonicalFormat;
import static org.keycloak.quarkus.runtime.configuration.PropertyMappers.formatValue;
import static org.keycloak.quarkus.runtime.Environment.getBuiltTimeProperty;
import java.util.HashSet;
import java.util.Map;
@ -31,10 +31,10 @@ import java.util.function.BiConsumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.keycloak.configuration.MicroProfileConfigProvider;
import org.keycloak.configuration.PersistedConfigSource;
import org.keycloak.configuration.PropertyMappers;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider;
import org.keycloak.quarkus.runtime.configuration.PersistedConfigSource;
import org.keycloak.quarkus.runtime.configuration.PropertyMappers;
import org.keycloak.quarkus.runtime.Environment;
import io.smallrye.config.ConfigValue;
import picocli.CommandLine;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import picocli.CommandLine;

View file

@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import picocli.CommandLine;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.cli.command;
package org.keycloak.quarkus.runtime.cli.command;
import picocli.CommandLine;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +15,13 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import static org.keycloak.cli.Picocli.ARG_KEY_VALUE_SPLIT;
import static org.keycloak.cli.Picocli.ARG_PREFIX;
import static org.keycloak.cli.Picocli.ARG_SPLIT;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_KEYCLOAK_PREFIX;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_QUARKUS_PREFIX;
import static org.keycloak.quarkus.runtime.cli.Picocli.ARG_KEY_VALUE_SPLIT;
import static org.keycloak.quarkus.runtime.cli.Picocli.ARG_PREFIX;
import static org.keycloak.quarkus.runtime.cli.Picocli.ARG_SPLIT;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_KEYCLOAK_PREFIX;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_QUARKUS_PREFIX;
import java.util.Collections;
import java.util.HashMap;
@ -31,7 +31,7 @@ import java.util.regex.Pattern;
import org.jboss.logging.Logger;
import io.smallrye.config.PropertiesConfigSource;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
/**
* <p>A configuration source for mapping configuration arguments to their corresponding properties so that they can be recognized

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import java.util.Optional;
import java.util.function.Function;
@ -23,7 +23,7 @@ import java.util.function.Function;
import io.smallrye.config.ConfigValue;
import io.smallrye.config.SmallRyeConfig;
import io.smallrye.config.SmallRyeConfigProviderResolver;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
/**
* The entry point for accessing the server configuration

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_KEYCLOAK_PREFIX;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_KEYCLOAK_PREFIX;
import java.io.File;
import java.nio.file.Path;
@ -28,8 +28,7 @@ import java.util.List;
import org.eclipse.microprofile.config.spi.ConfigSource;
import org.eclipse.microprofile.config.spi.ConfigSourceProvider;
import org.jboss.logging.Logger;
import org.keycloak.platform.Platform;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
public class KeycloakConfigSourceProvider implements ConfigSourceProvider {

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import java.io.Closeable;
import java.io.FileNotFoundException;
@ -36,8 +36,8 @@ import org.jboss.logging.Logger;
import io.smallrye.config.PropertiesConfigSource;
import static org.keycloak.common.util.StringPropertyReplacer.replaceProperties;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_KEYCLOAK;
import static org.keycloak.configuration.MicroProfileConfigProvider.NS_QUARKUS;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_KEYCLOAK;
import static org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider.NS_QUARKUS;
/**
* A configuration source for {@code keycloak.properties}.

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,9 +15,9 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
public final class Messages {

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import org.apache.commons.lang3.ArrayUtils;
import org.eclipse.microprofile.config.ConfigProvider;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import java.util.Optional;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import java.io.File;
import java.io.IOException;
@ -25,7 +25,7 @@ import java.util.Map;
import io.smallrye.config.PropertiesConfigSource;
import io.smallrye.config.common.utils.ConfigSourceUtil;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
/**
* A {@link org.eclipse.microprofile.config.spi.ConfigSource} based on the configuration properties persisted into the server

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,16 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import static org.keycloak.util.Environment.getBuiltTimeProperty;
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.BiFunction;
import java.util.function.Supplier;

View file

@ -1,5 +1,5 @@
/*
* Copyright 202 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,14 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import static org.keycloak.configuration.Messages.invalidDatabaseVendor;
import static org.keycloak.configuration.PropertyMapper.MAPPERS;
import static org.keycloak.configuration.PropertyMapper.create;
import static org.keycloak.configuration.PropertyMapper.createWithDefault;
import static org.keycloak.configuration.PropertyMapper.createBuildTimeProperty;
import static org.keycloak.provider.quarkus.QuarkusPlatform.addInitializationException;
import static org.keycloak.quarkus.runtime.configuration.Messages.invalidDatabaseVendor;
import static org.keycloak.quarkus.runtime.configuration.PropertyMapper.MAPPERS;
import static org.keycloak.quarkus.runtime.configuration.PropertyMapper.create;
import static org.keycloak.quarkus.runtime.configuration.PropertyMapper.createWithDefault;
import static org.keycloak.quarkus.runtime.configuration.PropertyMapper.createBuildTimeProperty;
import static org.keycloak.quarkus.runtime.integration.QuarkusPlatform.addInitializationException;
import java.io.File;
import java.nio.file.Paths;
@ -33,7 +33,9 @@ import java.util.stream.Collectors;
import io.smallrye.config.ConfigSourceInterceptorContext;
import io.smallrye.config.ConfigValue;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.storage.database.Database;
import org.keycloak.quarkus.runtime.Environment;
/**
* Configures the {@link PropertyMapper} instances for all Keycloak configuration properties that should be mapped to their

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import io.smallrye.config.ConfigSourceInterceptor;
import io.smallrye.config.ConfigSourceInterceptorContext;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.configuration;
import java.util.Map;
import java.util.Set;

View file

@ -0,0 +1,37 @@
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.quarkus.runtime.dev;
import io.vertx.ext.web.RoutingContext;
import org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>
*/
public class QuarkusDevRequestFilter extends QuarkusRequestFilter {
@Override
public void handle(RoutingContext context) {
if (context.request().uri().startsWith("/q/")) {
// do not go through Keycloak request filter if serving Quarkus resources such as dev console
context.next();
return;
}
super.handle(context);
}
}

View file

@ -1,10 +1,28 @@
package org.keycloak;
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.quarkus.runtime.integration;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.provider.ProviderManagerRegistry;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration;
import io.quarkus.runtime.ShutdownEvent;
import io.quarkus.runtime.StartupEvent;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,13 +15,12 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.FileAttribute;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
@ -29,7 +28,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.jboss.logging.Logger;
import org.keycloak.platform.Platform;
import org.keycloak.platform.PlatformProvider;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.InitializationException;
import org.keycloak.quarkus.runtime.Environment;
public class QuarkusPlatform implements PlatformProvider {

View file

@ -1,23 +1,21 @@
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* * Copyright 2021 Red Hat, Inc. and/or its affiliates
* * and other contributors as indicated by the @author tags.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.jaxrs;
import javax.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
@ -26,6 +24,7 @@ import java.lang.reflect.Type;
import org.jboss.resteasy.spi.ContextInjector;
import org.keycloak.common.ClientConnection;
import org.keycloak.common.util.Resteasy;
import org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter;
/**
* <p>This {@link ContextInjector} allows injecting {@link ClientConnection} to JAX-RS resources.

View file

@ -1,23 +1,21 @@
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* * Copyright 2021 Red Hat, Inc. and/or its affiliates
* * and other contributors as indicated by the @author tags.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.jaxrs;
import javax.ws.rs.ext.Provider;
import java.lang.annotation.Annotation;
@ -26,6 +24,7 @@ import java.lang.reflect.Type;
import org.jboss.resteasy.spi.ContextInjector;
import org.keycloak.common.util.Resteasy;
import org.keycloak.models.KeycloakSession;
import org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter;
/**
* <p>This {@link ContextInjector} allows injecting {@link KeycloakSession} to JAX-RS resources.

View file

@ -1,4 +1,21 @@
package org.keycloak;
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.quarkus.runtime.integration.jaxrs;
import java.util.Set;
import java.util.stream.Collectors;
@ -9,9 +26,10 @@ import javax.persistence.EntityManagerFactory;
import javax.ws.rs.ApplicationPath;
import org.keycloak.models.utils.PostMigrationEvent;
import org.keycloak.provider.quarkus.QuarkusPlatform;
import org.keycloak.quarkus.runtime.integration.QuarkusKeycloakSessionFactory;
import org.keycloak.quarkus.runtime.integration.QuarkusPlatform;
import org.keycloak.services.resources.KeycloakApplication;
import org.keycloak.services.resources.QuarkusWelcomeResource;
import org.keycloak.quarkus.runtime.services.resources.QuarkusWelcomeResource;
import org.keycloak.services.resources.WelcomeResource;
@ApplicationPath("/")
@ -42,6 +60,7 @@ public class QuarkusKeycloakApplication extends KeycloakApplication {
.collect(Collectors.toSet());
singletons.add(new QuarkusWelcomeResource());
singletons.add(new QuarkusWelcomeResource());
return singletons;
}

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.jaxrs;
import io.vertx.ext.web.RoutingContext;
import org.jboss.resteasy.core.ResteasyContext;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.services;
package org.keycloak.quarkus.runtime.integration.web;
import io.vertx.core.Handler;
import io.vertx.ext.web.RoutingContext;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.web;
import org.keycloak.common.ClientConnection;
import org.keycloak.models.KeycloakSession;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.web;
import java.security.cert.X509Certificate;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.integration.web;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSession;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.services.health;
package org.keycloak.quarkus.runtime.services.health;
import io.quarkus.smallrye.metrics.runtime.SmallRyeMetricsHandler;

View file

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.services.health;
package org.keycloak.quarkus.runtime.services.health;
import io.agroal.api.AgroalDataSource;
import io.quarkus.agroal.runtime.health.DataSourceHealthCheck;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.services.resources;
package org.keycloak.quarkus.runtime.services.resources;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.HttpRequest;
@ -27,6 +27,7 @@ import org.keycloak.models.KeycloakSession;
import org.keycloak.services.ForbiddenException;
import org.keycloak.services.ServicesLogger;
import org.keycloak.services.managers.ApplianceBootstrap;
import org.keycloak.services.resources.WelcomeResource;
import org.keycloak.services.util.CacheControlUtil;
import org.keycloak.services.util.CookieHelper;
import org.keycloak.theme.FreeMarkerUtil;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.configuration;
package org.keycloak.quarkus.runtime.storage.database;
import java.io.File;
import java.util.HashMap;
@ -29,7 +29,7 @@ import org.keycloak.connections.jpa.updater.liquibase.PostgresPlusDatabase;
import org.keycloak.connections.jpa.updater.liquibase.UpdatedMariaDBDatabase;
import org.keycloak.connections.jpa.updater.liquibase.UpdatedMySqlDatabase;
public class Database {
public final class Database {
private static Map<String, Vendor> DATABASES = new HashMap<>();
@ -47,7 +47,7 @@ public class Database {
return DATABASES.containsKey(alias);
}
static Optional<String> getDatabaseKind(String alias) {
public static Optional<String> getDatabaseKind(String alias) {
Vendor vendor = DATABASES.get(alias);
if (vendor == null) {
@ -57,7 +57,7 @@ public class Database {
return Optional.of(vendor.databaseKind);
}
static Optional<String> getDefaultUrl(String alias) {
public static Optional<String> getDefaultUrl(String alias) {
Vendor vendor = DATABASES.get(alias);
if (vendor == null) {
@ -67,7 +67,7 @@ public class Database {
return Optional.of(vendor.defaultUrl.apply(alias));
}
static Optional<String> getDriver(String alias) {
public static Optional<String> getDriver(String alias) {
Vendor vendor = DATABASES.get(alias);
if (vendor == null) {
@ -77,7 +77,7 @@ public class Database {
return Optional.of(vendor.driver);
}
static Optional<String> getDialect(String alias) {
public static Optional<String> getDialect(String alias) {
Vendor vendor = DATABASES.get(alias);
if (vendor == null) {

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,10 +15,10 @@
* limitations under the License.
*/
package org.keycloak.connections.jpa;
package org.keycloak.quarkus.runtime.storage.database.jpa;
import static org.keycloak.connections.jpa.util.JpaUtils.configureNamedQuery;
import static org.keycloak.connections.liquibase.QuarkusJpaUpdaterProvider.VERIFY_AND_RUN_MASTER_CHANGELOG;
import static org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusJpaUpdaterProvider.VERIFY_AND_RUN_MASTER_CHANGELOG;
import static org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction;
import java.io.File;
@ -51,6 +51,10 @@ import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.ServerStartupError;
import org.keycloak.common.Version;
import org.keycloak.connections.jpa.DefaultJpaConnectionProvider;
import org.keycloak.connections.jpa.JpaConnectionProvider;
import org.keycloak.connections.jpa.JpaConnectionProviderFactory;
import org.keycloak.connections.jpa.PersistenceExceptionConverter;
import org.keycloak.connections.jpa.updater.JpaUpdaterProvider;
import org.keycloak.connections.jpa.util.JpaUtils;
import org.keycloak.exportimport.ExportImportManager;
@ -68,7 +72,7 @@ import org.keycloak.services.ServicesLogger;
import org.keycloak.services.managers.ApplianceBootstrap;
import org.keycloak.services.managers.RealmManager;
import org.keycloak.transaction.JtaTransactionManagerLookup;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
import org.keycloak.util.JsonSerialization;
/**

View file

@ -1,4 +1,21 @@
package org.keycloak.connections.liquibase;
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.quarkus.runtime.storage.database.liquibase;
import java.util.HashSet;
import java.util.List;

View file

@ -1,4 +1,21 @@
package org.keycloak.connections.liquibase;
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.keycloak.quarkus.runtime.storage.database.liquibase;
import liquibase.changelog.ChangeSet;
import liquibase.changelog.DatabaseChangeLog;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.connections.liquibase;
package org.keycloak.quarkus.runtime.storage.database.liquibase;
import java.io.File;
import java.io.FileWriter;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.connections.liquibase;
package org.keycloak.quarkus.runtime.storage.database.liquibase;
import org.keycloak.Config;
import org.keycloak.connections.jpa.updater.JpaUpdaterProvider;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2016 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.connections.liquibase;
package org.keycloak.quarkus.runtime.storage.database.liquibase;
import java.lang.reflect.Method;
import java.sql.Connection;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.provider.quarkus;
package org.keycloak.quarkus.runtime.storage.infinispan;
import java.net.URL;
import java.nio.file.Path;
@ -29,7 +29,7 @@ import org.infinispan.manager.DefaultCacheManager;
import org.jboss.logging.Logger;
import org.keycloak.cluster.ManagedCacheManagerProvider;
import org.keycloak.Config;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
/**
* @author <a href="mailto:psilva@redhat.com">Pedro Igor</a>

View file

@ -17,7 +17,7 @@
*
*/
package org.keycloak.connections.cache;
package org.keycloak.quarkus.runtime.storage.infinispan;
import org.infinispan.manager.EmbeddedCacheManager;
import org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory;

View file

@ -1,5 +1,5 @@
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates
* Copyright 2021 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.keycloak.transaction;
package org.keycloak.quarkus.runtime.transaction;
import javax.enterprise.inject.spi.CDI;
import javax.transaction.TransactionManager;
@ -23,6 +23,7 @@ import javax.transaction.TransactionManager;
import org.jboss.logging.Logger;
import org.keycloak.Config;
import org.keycloak.models.KeycloakSessionFactory;
import org.keycloak.transaction.JtaTransactionManagerLookup;
public class QuarkusJtaTransactionManagerLookup implements JtaTransactionManagerLookup {

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.configuration.PropertyMappingInterceptor
org.keycloak.quarkus.runtime.configuration.PropertyMappingInterceptor

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.configuration.KeycloakConfigSourceProvider
org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider

View file

@ -1 +1 @@
org.keycloak.provider.quarkus.QuarkusCacheManagerProvider
org.keycloak.quarkus.runtime.storage.infinispan.QuarkusCacheManagerProvider

View file

@ -1 +1 @@
org.keycloak.provider.quarkus.ResteasyVertxProvider
org.keycloak.quarkus.runtime.integration.jaxrs.ResteasyVertxProvider

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.configuration.MicroProfileConfigProviderFactory
org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProviderFactory

View file

@ -17,4 +17,4 @@
# */
#
org.keycloak.connections.cache.QuarkusInfinispanConnectionFactory
org.keycloak.quarkus.runtime.storage.infinispan.QuarkusInfinispanConnectionFactory

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.connections.jpa.QuarkusJpaConnectionProviderFactory
org.keycloak.quarkus.runtime.storage.database.jpa.QuarkusJpaConnectionProviderFactory

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.connections.liquibase.QuarkusJpaUpdaterProviderFactory
org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusJpaUpdaterProviderFactory

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.connections.liquibase.QuarkusLiquibaseConnectionProvider
org.keycloak.quarkus.runtime.storage.database.liquibase.QuarkusLiquibaseConnectionProvider

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.provider.quarkus.QuarkusPlatform
org.keycloak.quarkus.runtime.integration.QuarkusPlatform

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
#
org.keycloak.provider.quarkus.VertxClientCertificateLookupFactory
org.keycloak.quarkus.runtime.integration.web.VertxClientCertificateLookupFactory

View file

@ -15,4 +15,4 @@
# limitations under the License.
#
org.keycloak.transaction.QuarkusJtaTransactionManagerLookup
org.keycloak.quarkus.runtime.transaction.QuarkusJtaTransactionManagerLookup

View file

@ -18,7 +18,7 @@
package org.keycloak.provider.quarkus;
import static org.junit.Assert.assertEquals;
import static org.keycloak.util.Environment.CLI_ARGS;
import static org.keycloak.quarkus.runtime.Environment.CLI_ARGS;
import java.io.File;
import java.lang.reflect.Field;
@ -36,12 +36,12 @@ import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.keycloak.Config;
import org.keycloak.configuration.KeycloakConfigSourceProvider;
import org.keycloak.configuration.MicroProfileConfigProvider;
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
import org.keycloak.quarkus.runtime.configuration.MicroProfileConfigProvider;
import io.quarkus.runtime.configuration.ConfigUtils;
import io.smallrye.config.SmallRyeConfigProviderResolver;
import org.keycloak.util.Environment;
import org.keycloak.quarkus.runtime.Environment;
public class ConfigurationTest {

View file

@ -5,7 +5,6 @@ import java.util.Arrays;
import java.util.List;
import io.quarkus.runtime.Quarkus;
import org.keycloak.util.Environment;
/**
* <p>This main class should be used to start the server in dev mode for development purposes. By running this class,