From ec73211198e29b1dd8e8352b2e1c5d12d00707b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Vav=C5=99=C3=ADk?= Date: Wed, 13 Dec 2023 21:11:26 +0100 Subject: [PATCH] Docs: Remove section of OIDC Dev Svc that doesnt work in new DEV UI --- .../security-openid-connect-dev-services.adoc | 77 ------------------- 1 file changed, 77 deletions(-) diff --git a/docs/src/main/asciidoc/security-openid-connect-dev-services.adoc b/docs/src/main/asciidoc/security-openid-connect-dev-services.adoc index ef10bb79181c1..cb9888041a398 100644 --- a/docs/src/main/asciidoc/security-openid-connect-dev-services.adoc +++ b/docs/src/main/asciidoc/security-openid-connect-dev-services.adoc @@ -340,83 +340,6 @@ quarkus.oidc.devui.grant.type=password quarkus.oidc.devui.grant-options.password.audience=http://localhost:8080 ---- -== Dev Services and UI Support for other OpenID Connect Providers - -Your custom extension would need to extend `quarkus-oidc` and add the dependencies required to support your provider to the extension's `deployment` module only. - -The build step dealing with the `Dev Services` should additionally register two runtime properties into the "io.quarkus.quarkus-oidc" namespace: `oidcProviderName` (for example, `Google`) and `oidcProviderUrlBase` (for example: `mycompany.devservices-google`) for the `OpenID Connect Card` to link to the Dev UI page representing your provider, for example: - -[source,java] ----- -package io.quarkus.oidc.okta.runtime; - -import java.util.function.Supplier; - -import io.quarkus.runtime.annotations.Recorder; - -// This simple recorder is the only code which will be located in the extension's `runtime` module -@Recorder -public class OktaDevServicesRecorder { - - public Supplier getProviderName() { - return new Supplier() { - - @Override - public String get() { - return "OKTA"; - } - }; - } - - public Supplier getProviderUrlBase() { - return new Supplier() { - - @Override - public String get() { - return "io.quarkus" + "." + "quarkus-oidc-okta"; - } - }; - } -} - - -package io.quarkus.oidc.okta.deployment.devservices; - -import static io.quarkus.deployment.annotations.ExecutionTime.RUNTIME_INIT; - -import java.util.Optional; - -import io.quarkus.deployment.IsDevelopment; -import io.quarkus.deployment.annotations.BuildProducer; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.Consume; -import io.quarkus.deployment.annotations.Record; -import io.quarkus.deployment.builditem.RuntimeConfigSetupCompleteBuildItem; -import io.quarkus.devconsole.spi.DevConsoleRouteBuildItem; -import io.quarkus.devconsole.spi.DevConsoleRuntimeTemplateInfoBuildItem; - -public class OktaDevConsoleProcessor { - - @BuildStep(onlyIf = IsDevelopment.class) - @Record(value = RUNTIME_INIT) - public void setOidcProviderProperties(BuildProducer provider, - OktaDevServicesRecorder recorder, - Optional configProps) { - if (configProps.isPresent()) { - provider.produce(new DevConsoleRuntimeTemplateInfoBuildItem("io.quarkus", "quarkus-oidc", "oidcProviderName", - recorder.getProviderName())); - provider.produce(new DevConsoleRuntimeTemplateInfoBuildItem("io.quarkus", "quarkus-oidc", "oidcProviderUrlBase", - recorder.getProviderUrlBase())); - } - } -} - ----- - -Additionally, the extension should produce a `io.quarkus.oidc.deployment.devservices.OidcProviderBuildItem` to disable the default `Dev Services for Keycloak`, instead of the users having to type `quarkus.keycloak.devservices.enabled=false`. - -Please follow the xref:dev-ui.adoc[Dev UI] tutorial as well as check the `extensions/oidc/deployment` sources for more ideas. - == Non Application Root Path Considerations This document refers to the `http://localhost:8080/q/dev-ui` Dev UI URL in several places where `q` is a default non application root path. If you customize `quarkus.http.root-path` and/or `quarkus.http.non-application-root-path` properties then replace `q` accordingly, please see https://quarkus.io/blog/path-resolution-in-quarkus/[Path Resolution in Quarkus] for more information.