Search in sources :

Example 1 with QuarkusDevRequestFilter

use of org.keycloak.quarkus.runtime.dev.QuarkusDevRequestFilter in project keycloak by keycloak.

the class KeycloakProcessor method initializeFilter.

@BuildStep
void initializeFilter(BuildProducer<FilterBuildItem> filters, LaunchModeBuildItem launchModeBuildItem) {
    QuarkusRequestFilter filter = new QuarkusRequestFilter();
    LaunchMode launchMode = launchModeBuildItem.getLaunchMode();
    if (launchMode.isDevOrTest()) {
        filter = new QuarkusDevRequestFilter();
    }
    filters.produce(new FilterBuildItem(filter, FilterBuildItem.AUTHORIZATION - 10));
}
Also used : LaunchMode(io.quarkus.runtime.LaunchMode) QuarkusRequestFilter(org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter) QuarkusDevRequestFilter(org.keycloak.quarkus.runtime.dev.QuarkusDevRequestFilter) FilterBuildItem(io.quarkus.vertx.http.deployment.FilterBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Aggregations

BuildStep (io.quarkus.deployment.annotations.BuildStep)1 LaunchMode (io.quarkus.runtime.LaunchMode)1 FilterBuildItem (io.quarkus.vertx.http.deployment.FilterBuildItem)1 QuarkusDevRequestFilter (org.keycloak.quarkus.runtime.dev.QuarkusDevRequestFilter)1 QuarkusRequestFilter (org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter)1