Skip to content

Commit

Permalink
fix: retrieve cookie name at runtime (#1351) (#1352)
Browse files Browse the repository at this point in the history
(cherry picked from commit 37115fd)

Co-authored-by: Marco Collovati <[email protected]>
  • Loading branch information
quarkus-hilla-bot[bot] and mcollovati authored Feb 28, 2025
1 parent 0a65067 commit de0e810
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 de0e810

Please sign in to comment.