+

Adapted casServiceValidationSuccess.jsp file to included attributes in XML (required by phpCAS)

Benjamin Renard [2014-12-29 18:22:57]
Adapted casServiceValidationSuccess.jsp file to included attributes in XML (required by phpCAS)
Filename
custom/webpages/WEB-INF/view/jsp/protocol/2.0/casServiceValidationSuccess.jsp
diff --git a/custom/webpages/WEB-INF/view/jsp/protocol/2.0/casServiceValidationSuccess.jsp b/custom/webpages/WEB-INF/view/jsp/protocol/2.0/casServiceValidationSuccess.jsp
index 5b9f229..1a1d7c0 100644
--- a/custom/webpages/WEB-INF/view/jsp/protocol/2.0/casServiceValidationSuccess.jsp
+++ b/custom/webpages/WEB-INF/view/jsp/protocol/2.0/casServiceValidationSuccess.jsp
@@ -1,6 +1,13 @@
 <%@ page session="false" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %><cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
 	<cas:authenticationSuccess>
+        <c:forEach var="auth" items="${assertion.chainedAuthentications}">
 		<cas:user>${fn:escapeXml(assertion.chainedAuthentications[fn:length(assertion.chainedAuthentications)-1].principal.id)}</cas:user>
+                <c:forEach var="attr" items="${auth.principal.attributes}" >
+                   <cas:attribute
+                        name="${fn:escapeXml(attr.key)}"
+                        value="${fn:escapeXml(attr.value)}"/>
+                </c:forEach>
+        </c:forEach>
 <c:if test="${not empty pgtIou}">
 		<cas:proxyGrantingTicket>${pgtIou}</cas:proxyGrantingTicket>
 </c:if>
@@ -12,4 +19,4 @@
 		</cas:proxies>
 </c:if>
 	</cas:authenticationSuccess>
-</cas:serviceResponse>
\ No newline at end of file
+</cas:serviceResponse>
ViewGit