Author: anil.saldhana(a)jboss.com
Date: 2010-12-10 15:21:44 -0500 (Fri, 10 Dec 2010)
New Revision: 598
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML20TokenRoleAttributeProvider.java
federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java
Log:
fix the calls
Modified:
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML20TokenRoleAttributeProvider.java
===================================================================
---
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML20TokenRoleAttributeProvider.java 2010-12-10
20:17:18 UTC (rev 597)
+++
federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML20TokenRoleAttributeProvider.java 2010-12-10
20:21:44 UTC (rev 598)
@@ -87,7 +87,7 @@
AttributeType rolesAttribute = new AttributeType( tokenRoleAttributeName );
attributeStatement.addAttribute( new ASTChoiceType(rolesAttribute) );
- List<Object> roles = rolesAttribute.getAttributeValue();
+ //List<Object> roles = rolesAttribute.getAttributeValue();
for( Principal rolePrincipal : subject.getPrincipals() )
{
if( JBOSS_ROLE_PRINCIPAL_NAME.equalsIgnoreCase( rolePrincipal.getName() )
)
@@ -97,7 +97,8 @@
while( members.hasMoreElements() )
{
Principal role = (Principal)members.nextElement();
- roles.add( role.getName() );
+ rolesAttribute.addAttributeValue( role.getName() );
+ //roles.add( role.getName() );
}
}
}
Modified:
federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java
===================================================================
---
federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java 2010-12-10
20:17:18 UTC (rev 597)
+++
federation/trunk/picketlink-bindings-jboss/src/test/java/org/picketlink/test/identity/federation/bindings/jboss/auth/STSMappingProviderUnitTestCase.java 2010-12-10
20:21:44 UTC (rev 598)
@@ -80,8 +80,8 @@
assertion.addStatement( attributeStatementType );
AttributeType attributeType = new AttributeType( roleAttributeName );
attributeStatementType.addAttribute( new ASTChoiceType(attributeType));
- attributeType.getAttributeValue().add(role1);
- attributeType.getAttributeValue().add(role2);
+ attributeType.addAttributeValue( role1 );
+ attributeType.addAttributeValue( role2 );
MappingResult<RoleGroup> mappingResult = new
MappingResult<RoleGroup>();
Map<String, Object> contextMap = new HashMap<String, Object>();
Show replies by date