@@ -53,7 +53,7 @@ public class HomeController extends BaseController {
53
53
54
54
private static final Locale DEFAULT_LOCALE = Locale .US ;
55
55
56
- private static final String JSESSIONID = "JSESSIONID " ;
56
+ private static final String SESSION_COOKIE_NAME = "SESSION " ;
57
57
58
58
@ Value ("${org.orcid.core.aboutUri:http://about.orcid.org}" )
59
59
private String aboutUri ;
@@ -139,30 +139,30 @@ Object getUserStatusJson(HttpServletRequest request, HttpServletResponse respons
139
139
}
140
140
141
141
if (logUserOut != null && logUserOut .booleanValue ()) {
142
- removeJSessionIdCookie (request , response );
142
+ removeSessionIdCookie (request , response );
143
143
SecurityContextHolder .clearContext ();
144
144
if (request .getSession (false ) != null ) {
145
145
request .getSession ().invalidate ();
146
- }
147
-
146
+ }
147
+
148
148
logoutCurrentUser (request , response );
149
-
149
+
150
150
UserStatus us = new UserStatus ();
151
151
us .setLoggedIn (false );
152
152
return us ;
153
153
} else {
154
154
UserStatus us = new UserStatus ();
155
- us .setLoggedIn ((orcid != null ));
155
+ us .setLoggedIn ((orcid != null ));
156
156
return us ;
157
- }
157
+ }
158
158
}
159
-
160
- private void removeJSessionIdCookie (HttpServletRequest request , HttpServletResponse response ) {
159
+
160
+ private void removeSessionIdCookie (HttpServletRequest request , HttpServletResponse response ) {
161
161
Cookie [] cookies = request .getCookies ();
162
162
// Delete cookie and token associated with that cookie
163
163
if (cookies != null ) {
164
164
for (Cookie cookie : cookies ) {
165
- if (JSESSIONID .equals (cookie .getName ())) {
165
+ if (SESSION_COOKIE_NAME .equals (cookie .getName ())) {
166
166
cookie .setValue (StringUtils .EMPTY );
167
167
cookie .setMaxAge (0 );
168
168
response .addCookie (cookie );
0 commit comments