Author: anil.saldhana(a)jboss.com
Date: 2011-03-15 15:15:38 -0400 (Tue, 15 Mar 2011)
New Revision: 816
Modified:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AttributeHandler.java
federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java
Log:
PLFED-159: saml attribute handler on sp side should populate the http session with idp
passed attributes
Modified:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AttributeHandler.java
===================================================================
---
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AttributeHandler.java 2011-03-15
19:09:44 UTC (rev 815)
+++
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AttributeHandler.java 2011-03-15
19:15:38 UTC (rev 816)
@@ -161,11 +161,11 @@
for (ASTChoiceType attrChoice : attrs)
{
AttributeType attr = attrChoice.getAttribute();
- Map<String, Object> attrMap = (Map<String, Object>) session
+ Map<String, List<Object>> attrMap = (Map<String,
List<Object>>) session
.getAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP);
if (attrMap == null)
{
- attrMap = new HashMap<String, Object>();
+ attrMap = new HashMap<String, List<Object>>();
session.setAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP, attrMap);
}
attrMap.put(attr.getFriendlyName(), attr.getAttributeValue());
Modified:
federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java 2011-03-15
19:09:44 UTC (rev 815)
+++
federation/trunk/picketlink-web/src/test/java/org/picketlink/test/identity/federation/web/saml/handlers/SAML2AttributeHandlerUnitTestCase.java 2011-03-15
19:15:38 UTC (rev 816)
@@ -167,10 +167,10 @@
request.addOption(GeneralConstants.ASSERTION, assertion);
handler.handleStatusResponseType(request, response);
- Map<String, Object> sessionMap = (Map<String, Object>) session
+ Map<String, List<Object>> sessionMap = (Map<String,
List<Object>>) session
.getAttribute(GeneralConstants.SESSION_ATTRIBUTE_MAP);
assertNotNull(sessionMap);
- List<Object> values = (List<Object>)
sessionMap.get("testKey");
+ List<Object> values = sessionMap.get("testKey");
assertEquals("hello", values.get(0));
}
Show replies by date