File tree 1 file changed +16
-6
lines changed
gateway-ha/src/main/java/io/trino/gateway/ha/security
1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,26 @@ private SessionCookie() {}
25
25
26
26
public static NewCookie getTokenCookie (String token )
27
27
{
28
- return new NewCookie (OAUTH_ID_TOKEN ,
29
- token , "/" , "" , "" ,
30
- 60 * 60 * 24 , true );
28
+ return new NewCookie .Builder (OAUTH_ID_TOKEN )
29
+ .value (token )
30
+ .path ("/" )
31
+ .domain ("" )
32
+ .comment ("" )
33
+ .maxAge (60 * 60 * 24 )
34
+ .secure (true )
35
+ .build ();
31
36
}
32
37
33
38
public static Response logOut ()
34
39
{
35
- NewCookie cookie = new NewCookie (OAUTH_ID_TOKEN ,
36
- "logout" , "/" , "" , "" ,
37
- 0 , true );
40
+ NewCookie cookie = new NewCookie .Builder (OAUTH_ID_TOKEN )
41
+ .value ("logout" )
42
+ .path ("/" )
43
+ .domain ("" )
44
+ .comment ("" )
45
+ .maxAge (0 )
46
+ .secure (true )
47
+ .build ();
38
48
return Response .ok ("You are logged out successfully." )
39
49
.cookie (cookie )
40
50
.build ();
You can’t perform that action at this time.
0 commit comments