Skip to content

Commit

Permalink
Set SameSite to LAX for OidcCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
oneonestar authored and mosabua committed May 30, 2024
1 parent fa86c26 commit 3014fd1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import static com.google.common.base.Preconditions.checkState;
import static io.trino.gateway.ha.resource.LoginResource.CALLBACK_ENDPOINT;
import static jakarta.ws.rs.core.NewCookie.SameSite.STRICT;
import static jakarta.ws.rs.core.NewCookie.SameSite.LAX;

public class OidcCookie
{
Expand All @@ -42,7 +42,7 @@ public static NewCookie create(String state, String nonce)
.value(String.join(DELIMITER, state, nonce))
.path(CALLBACK_ENDPOINT)
.maxAge(TOKEN_EXPIRATION_SECOND)
.sameSite(STRICT)
.sameSite(LAX)
.secure(true)
.httpOnly(true)
.build();
Expand Down Expand Up @@ -71,7 +71,7 @@ public static NewCookie delete()
.value("delete")
.path(CALLBACK_ENDPOINT)
.maxAge(0)
.sameSite(STRICT)
.sameSite(LAX)
.secure(true)
.httpOnly(true)
.build();
Expand Down

0 comments on commit 3014fd1

Please sign in to comment.