{
//Deal with the X500 Profile of SAML2
attrStatement = JBossSAMLBaseFactory.createAttributeStatement();
i++;
}
AttributeType att = getX500Attribute();
Object value = attributes.get(key);
if(AttributeConstants.EMAIL_ADDRESS.equals(key))
{
att.setFriendlyName(X500SAMLProfileConstants.EMAIL_ADDRESS.getFriendlyName());
att.setName(X500SAMLProfileConstants.EMAIL_ADDRESS.get());
}
else if(AttributeConstants.EMPLOYEE_NUMBER.equals(key))
{
att.setFriendlyName(X500SAMLProfileConstants.EMPLOYEE_NUMBER.getFriendlyName());
att.setName(X500SAMLProfileConstants.EMPLOYEE_NUMBER.get());
}
else if(AttributeConstants.GIVEN_NAME.equals(key))
{
att.setFriendlyName(X500SAMLProfileConstants.GIVENNAME.getFriendlyName());
att.setName(X500SAMLProfileConstants.GIVENNAME.get());
}
else if(AttributeConstants.TELEPHONE.equals(key))
{
att.setFriendlyName(X500SAMLProfileConstants.TELEPHONE.getFriendlyName());
att.setName(X500SAMLProfileConstants.TELEPHONE.get());
}
att.getAttributeValue().add(value);
attrStatement.getAttributeOrEncryptedAttribute().add(att);
}
return attrStatement;
}