[java-shib-idp2 COMMIT] in /branches/REL_2: doc/RELEASE-NOTES.txt src/main/java/edu/internet2/middleware/shibboleth/i...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Aug 5 13:17:32 EDT 2014
Author: scantor
Date: Tue Aug 5 13:17:32 2014
New Revision: 3186
URL: http://svn.shibboleth.net/view/java-shib-idp2?rev=3186&view=rev
Log:
SIDP-601 - clear the client-side cookie when logging out at the IdP
Modified:
branches/REL_2/doc/RELEASE-NOTES.txt
branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SLOProfileHandler.java
Modified: branches/REL_2/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-idp2/branches/REL_2/doc/RELEASE-NOTES.txt?rev=3186&r1=3185&r2=3186&view=diff
==============================================================================
--- branches/REL_2/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_2/doc/RELEASE-NOTES.txt Tue Aug 5 13:17:32 2014
@@ -10,6 +10,7 @@
[JXT-106] - Update Apache Santuario (xmlsec) to 1.5.6
[SIDP-587] - log level too high?
[SIDP-600] - Make the inbound message issuer (SP's entity ID) available to logout.jsp
+[SIDP-601] - SLO: also clear the client-side cookie when logging out at the IdP
[SIDP-607] - Incorrect/misleading Kerberos authentication example in login.config
Changes in Release 2.4.0
Modified: branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SLOProfileHandler.java
URL: http://svn.shibboleth.net/view/java-shib-idp2/branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SLOProfileHandler.java?rev=3186&r1=3185&r2=3186&view=diff
==============================================================================
--- branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SLOProfileHandler.java (original)
+++ branches/REL_2/src/main/java/edu/internet2/middleware/shibboleth/idp/profile/saml2/SLOProfileHandler.java Tue Aug 5 13:17:32 2014
@@ -23,12 +23,15 @@
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml2.LogoutRequestConfiguration;
import edu.internet2.middleware.shibboleth.common.session.SessionManager;
import edu.internet2.middleware.shibboleth.idp.session.Session;
+import edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper;
+
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.List;
import javax.servlet.RequestDispatcher;
+import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -195,6 +198,18 @@
response.setHeader("Cache-Control", "content=\"no-store,no-cache,must-revalidate\"");
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "-1");
+
+ final Cookie c = HttpServletHelper.getCookie(request, HttpServletHelper.IDP_SESSION_COOKIE);
+ if (c != null) {
+ c.setValue("");
+ final String d = HttpServletHelper.getCookieDomain(request.getSession().getServletContext());
+ if (d != null) {
+ c.setDomain(d);
+ }
+ c.setPath(request.getContextPath());
+ c.setMaxAge(0);
+ response.addCookie(c);
+ }
if (velocity != null) {
VelocityContext vCtx = new VelocityContext();
More information about the commits
mailing list