mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 13:03:11 +00:00
Added setSecure option to authetication cookie
This commit is contained in:
@@ -160,6 +160,7 @@ public class JWTTokenRestAuthenticationServiceImpl implements RestAuthentication
|
|||||||
if (addCookie) {
|
if (addCookie) {
|
||||||
Cookie cookie = new Cookie(AUTHORIZATION_COOKIE, token);
|
Cookie cookie = new Cookie(AUTHORIZATION_COOKIE, token);
|
||||||
cookie.setHttpOnly(true);
|
cookie.setHttpOnly(true);
|
||||||
|
cookie.setSecure(true);
|
||||||
response.addCookie(cookie);
|
response.addCookie(cookie);
|
||||||
}
|
}
|
||||||
response.setHeader(AUTHORIZATION_HEADER, String.format("%s %s", AUTHORIZATION_TYPE, token));
|
response.setHeader(AUTHORIZATION_HEADER, String.format("%s %s", AUTHORIZATION_TYPE, token));
|
||||||
|
Reference in New Issue
Block a user