mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
Invalidate authorization cookie on logout
This commit is contained in:
@@ -113,6 +113,7 @@ public class JWTTokenRestAuthenticationServiceImpl implements RestAuthentication
|
|||||||
String token = getToken(request);
|
String token = getToken(request);
|
||||||
Cookie cookie = new Cookie(AUTHORIZATION_COOKIE, "");
|
Cookie cookie = new Cookie(AUTHORIZATION_COOKIE, "");
|
||||||
cookie.setHttpOnly(true);
|
cookie.setHttpOnly(true);
|
||||||
|
cookie.setMaxAge(0);
|
||||||
response.addCookie(cookie);
|
response.addCookie(cookie);
|
||||||
jwtTokenHandler.invalidateToken(token, request, context);
|
jwtTokenHandler.invalidateToken(token, request, context);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user