<modelVersion>4.0.0</modelVersion>
<groupId>edu.internet2.middleware</groupId>
<artifactId>shibboleth-identityprovider</artifactId>
- <version>2.1.3</version>
+ <version>2.1.4</version>
<!-- We bundle as a jar here, the installer creates the WAR -->
<packaging>jar</packaging>
} else {
retainSubjectsPublicCredentials = false;
}
-
- handlerManager = HttpServletHelper.getProfileHandlerManager(config.getServletContext());
- sessionManager = HttpServletHelper.getSessionManager(config.getServletContext());
- storageService = (StorageService<String, LoginContextEntry>) HttpServletHelper.getStorageService(config
- .getServletContext());
-
context = config.getServletContext();
+ handlerManager = HttpServletHelper.getProfileHandlerManager(context);
+ sessionManager = HttpServletHelper.getSessionManager(context);
+ storageService = (StorageService<String, LoginContextEntry>) HttpServletHelper.getStorageService(context);
}
/**
forwardRequest("/error.jsp", httpRequest, httpResponse);
}
+ // Remove the login context from the replicated store and bind it to the request
+ HttpServletHelper.unbindLoginContext(storageService, context, httpRequest, httpResponse);
HttpServletHelper.bindLoginContext(loginContext, httpRequest);
LOG.debug("Returning control to profile handler at: {}", loginContext.getProfileHandlerURL());
forwardRequest(loginContext.getProfileHandlerURL(), httpRequest, httpResponse);
if (actualAuthnMethod != null) {
if (!loginContext.getRequestedAuthenticationMethods().isEmpty()
&& !loginContext.getRequestedAuthenticationMethods().contains(actualAuthnMethod)) {
- String msg = MessageFormatter.format(
+ String msg = MessageFormatter
+ .format(
"Relying patry required an authentication method of '{}' but the login handler performed '{}'",
loginContext.getRequestedAuthenticationMethods(), actualAuthnMethod);
LOG.error(msg);
cookieValue.append(Base64.encodeBytes(remoteAddress, Base64.DONT_BREAK_LINES)).append("|");
cookieValue.append(Base64.encodeBytes(sessionId, Base64.DONT_BREAK_LINES)).append("|");
cookieValue.append(signature);
-
+
Cookie sessionCookie = new Cookie(IDP_SESSION_COOKIE_NAME, HTTPTransportUtils.urlEncode(cookieValue.toString()));
sessionCookie.setVersion(1);
- sessionCookie.setPath(httpRequest.getContextPath() == "" ? "/" : httpRequest.getContextPath());
+ sessionCookie.setPath("".equals(httpRequest.getContextPath()) ? "/" : httpRequest.getContextPath());
sessionCookie.setSecure(httpRequest.isSecure());
httpResponse.addCookie(sessionCookie);
}
Cookie contextKeyCookie = new Cookie(LOGIN_CTX_KEY_NAME, contextKey);
contextKeyCookie.setVersion(1);
- contextKeyCookie.setPath(httpRequest.getContextPath() == "" ? "/" : httpRequest.getContextPath());
+ contextKeyCookie.setPath("".equals(httpRequest.getContextPath()) ? "/" : httpRequest.getContextPath());
contextKeyCookie.setSecure(httpRequest.isSecure());
httpResponse.addCookie(contextKeyCookie);
}
httpRequest.setAttribute(LOGIN_CTX_KEY_NAME, null);
loginContextKeyCookie.setMaxAge(0);
+ loginContextKeyCookie.setPath("".equals(httpRequest.getContextPath()) ? "/" : httpRequest.getContextPath());
+ loginContextKeyCookie.setVersion(1);
httpResponse.addCookie(loginContextKeyCookie);
LoginContextEntry entry = (LoginContextEntry) storageService.remove(getContextParam(context,