From dc92752ae1bb694f3a8139ac8348902220766d5a Mon Sep 17 00:00:00 2001 From: Phillip Kruger Date: Mon, 13 Nov 2023 13:47:02 +1100 Subject: [PATCH] OpenAPI make sure basic auth auto detection work Signed-off-by: Phillip Kruger --- .../vertx/http/deployment/HttpSecurityProcessor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/HttpSecurityProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/HttpSecurityProcessor.java index 65ed375ee01cd..e414b69b3f7a9 100644 --- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/HttpSecurityProcessor.java +++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/HttpSecurityProcessor.java @@ -104,9 +104,10 @@ AdditionalBeanBuildItem initBasicAuth(HttpBuildTimeConfig buildTimeConfig, .appliedToClass() .whenClass(cl -> BASIC_AUTH_MECH_NAME.equals(cl.name())) .thenTransform(t -> t.add(DEFAULT_BEAN)))); - if (buildTimeConfig.auth.basic.isPresent() && buildTimeConfig.auth.basic.get()) { - securityInformationProducer.produce(SecurityInformationBuildItem.BASIC()); - } + } + + if (buildTimeConfig.auth.basic.isPresent() && buildTimeConfig.auth.basic.get()) { + securityInformationProducer.produce(SecurityInformationBuildItem.BASIC()); } return AdditionalBeanBuildItem.builder().setUnremovable().addBeanClass(BasicAuthenticationMechanism.class).build();