Skip to content

Commit

Permalink
fix: retrieve cookie name at runtime (#1351)
Browse files Browse the repository at this point in the history
(cherry picked from commit 37115fd)
  • Loading branch information
mcollovati authored and github-actions[bot] committed Feb 28, 2025
1 parent 0a65067 commit 19d6872
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
public class HillaSecurityRecorder {

public Supplier<HillaFormAuthenticationMechanism> setupFormAuthenticationMechanism() {
String cookieName = ConfigProvider.getConfig().getValue("quarkus.http.auth.form.cookie-name", String.class);
String landingPage = ConfigProvider.getConfig()
.getOptionalValue("quarkus.http.auth.form.landing-page", String.class)
.orElse("/");
return () -> {
Config config = ConfigProvider.getConfig();
String cookieName = config.getValue("quarkus.http.auth.form.cookie-name", String.class);
String landingPage = config.getOptionalValue("quarkus.http.auth.form.landing-page", String.class)
.orElse("/");
FormAuthenticationMechanism delegate =
Arc.container().instance(FormAuthenticationMechanism.class).get();
return new HillaFormAuthenticationMechanism(delegate, cookieName, landingPage, "/logout");
Expand Down

0 comments on commit 19d6872

Please sign in to comment.