Repository: cxf-fediz Updated Branches: refs/heads/master f9bc1e69a -> a32b934ff
[FEDIZ-96] - Nullpointer exception if logout is called before login Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/a32b934f Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/a32b934f Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/a32b934f Branch: refs/heads/master Commit: a32b934ffc498410ba3761dd66c568df24a98a8f Parents: f9bc1e6 Author: Colm O hEigeartaigh <[email protected]> Authored: Wed Mar 11 16:25:56 2015 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Wed Mar 11 16:25:56 2015 +0000 ---------------------------------------------------------------------- .../src/main/webapp/WEB-INF/signoutresponse.jsp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/a32b934f/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp ---------------------------------------------------------------------- diff --git a/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp b/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp index 5314ab1..c06fe85 100644 --- a/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp +++ b/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp @@ -1,5 +1,4 @@ <%@ page import="java.util.Map" %> -<%@ page import="org.apache.cxf.fediz.service.idp.domain.Idp" %> <%@ page import="org.apache.cxf.fediz.service.idp.beans.SigninParametersCacheAction" %> <%@ page import="org.apache.cxf.fediz.core.FederationConstants" %> <%@ page import="java.util.List" %> @@ -16,23 +15,27 @@ <p> <% - final Idp idpConfig = (Idp) request.getAttribute(SigninParametersCacheAction.IDP_CONFIG); - @SuppressWarnings("unchecked") Map<String, String> rum = (Map<String, String>) request.getAttribute(SigninParametersCacheAction.REALM_URL_MAP); - Iterator<Map.Entry<String, String>> iterator = rum.entrySet().iterator(); + if (rum == null) { + %> + <p>You have already logged out</p> + <% + } else { + Iterator<Map.Entry<String, String>> iterator = rum.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry<String, String> next = iterator.next(); - String rpUri = next.getValue(); - if (rpUri != null) { + while (iterator.hasNext()) { + Map.Entry<String, String> next = iterator.next(); + String rpUri = next.getValue(); + if (rpUri != null) { %> Logout status of RP <%= rpUri%>: <img src="<%=rpUri + "?" + FederationConstants.PARAM_ACTION + "=" + FederationConstants.ACTION_SIGNOUT_CLEANUP %>"/> <br/> <% + } } } %>
