Package org.jboss.identity.federation.saml.v2.assertion

Examples of org.jboss.identity.federation.saml.v2.assertion.AttributeType


      return attrStatement;
   }
  
   private static AttributeType getX500Attribute()
   {
      AttributeType att = factory.createAttributeType();
      att.getOtherAttributes().put(X500_QNAME, "LDAP");
     
      att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_URI.get());
      return att;
   }
View Full Code Here


               AttributeStatementType attributeStatement = (AttributeStatementType) statement;
               for (Object object : attributeStatement.getAttributeOrEncryptedAttribute())
               {
                  if (object instanceof AttributeType)
                  {
                     AttributeType attr = (AttributeType) object;
                     List<String> values = user.attributes.get(attr.getName());
                     if (values == null)
                     {
                        values = new LinkedList<String>();
                     }
                     for (Object value : attr.getAttributeValue())
                     {
                        values.add((String) value);
                     }
                     user.attributes.put(attr.getName(), values);
                  }
                  else
                  {
                     log.warn("Encrypted attributes are not supported. Ignoring the attribute.");
                  }
View Full Code Here

   public AttributeStatementType createAttributeStatement(List<String> roles)
   {
      AttributeStatementType attrStatement = JBossSAMLBaseFactory.createAttributeStatement();
      for(String role: roles)
      {
         AttributeType attr = JBossSAMLBaseFactory.createAttributeForRole(role);
         attrStatement.getAttributeOrEncryptedAttribute().add(attr);
      }
      return attrStatement;
   }
View Full Code Here

      //Let us get the roles
      AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
      List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
      for(Object obj:attList)
      {
         AttributeType attr = (AttributeType) obj;
         String roleName = (String) attr.getAttributeValue().get(0);
         roles.add(roleName);
      }
     
      Principal principal = new Principal()
      {
View Full Code Here

   public AttributeStatementType createAttributeStatement(List<String> roles)
   {
      AttributeStatementType attrStatement = JBossSAMLBaseFactory.createAttributeStatement();
      for(String role: roles)
      {
         AttributeType attr = JBossSAMLBaseFactory.createAttributeForRole(role);
         attrStatement.getAttributeOrEncryptedAttribute().add(attr);
      }
      return attrStatement;
   }
View Full Code Here

         //Let us get the roles
         AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
         List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
         for(Object obj:attList)
         {
            AttributeType attr = (AttributeType) obj;
            String roleName = (String) attr.getAttributeValue().get(0);
            roles.add(roleName);
         }
        
         Principal principal = new Principal()
         {
View Full Code Here

      //Let us get the roles
      AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
      List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
      for(Object obj:attList)
      {
         AttributeType attr = (AttributeType) obj;
         String roleName = (String) attr.getAttributeValue().get(0);
         roles.add(roleName);
      }
     
      Principal principal = new Principal()
      {
View Full Code Here

    * @param roleName
    * @return
    */
   public static AttributeType createAttributeForRole(String roleName)
   {
      AttributeType att = assertionObjectFactory.createAttributeType();
      att.setFriendlyName("role");
      att.setName("role");
      att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get());
     
      //rolename
      att.getAttributeValue().add(roleName);
     
      return att;
   }
View Full Code Here

    * @return
    */
   public static AttributeStatementType createAttributeStatement(String attributeValue)
   {
      AttributeStatementType attribStatement = assertionObjectFactory.createAttributeStatementType();
      AttributeType att = assertionObjectFactory.createAttributeType();
      JAXBElement<Object> attValue = assertionObjectFactory.createAttributeValue(attributeValue);
      att.getAttributeValue().add(attValue);
      attribStatement.getAttributeOrEncryptedAttribute().add(att);
      return attribStatement;
   }
View Full Code Here

      //Let us get the roles
      AttributeStatementType attributeStatement = (AttributeStatementType) assertion.getStatementOrAuthnStatementOrAuthzDecisionStatement().get(0);
      List<Object> attList = attributeStatement.getAttributeOrEncryptedAttribute();
      for(Object obj:attList)
      {
         AttributeType attr = (AttributeType) obj;
         String roleName = (String) attr.getAttributeValue().get(0);
         roles.add(roleName);
      }
      return this.createGenericPrincipal(request, userName, roles);      
   }
View Full Code Here

TOP

Related Classes of org.jboss.identity.federation.saml.v2.assertion.AttributeType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.