Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,26 @@ private SessionCookie() {}

public static NewCookie getTokenCookie(String token)
{
return new NewCookie(OAUTH_ID_TOKEN,
token, "/", "", "",
60 * 60 * 24, true);
return new NewCookie.Builder(OAUTH_ID_TOKEN)
.value(token)
.path("/")
.domain("")
.comment("")
.maxAge(60 * 60 * 24)
.secure(true)
.build();
}

public static Response logOut()
{
NewCookie cookie = new NewCookie(OAUTH_ID_TOKEN,
"logout", "/", "", "",
0, true);
NewCookie cookie = new NewCookie.Builder(OAUTH_ID_TOKEN)
.value("logout")
.path("/")
.domain("")
.comment("")
.maxAge(0)
.secure(true)
.build();
return Response.ok("You are logged out successfully.")
.cookie(cookie)
.build();
Expand Down