Skip to content

Commit

Permalink
OpenAPI make sure basic auth auto detection work
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger committed Nov 13, 2023
1 parent ff547e9 commit 055978e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 055978e

Please sign in to comment.