Package org.jboss.security.identity.plugins

Examples of org.jboss.security.identity.plugins.SimpleRoleGroup


      assertTrue(secondRoleGroup.containsAtleastOneRole(firstRoleGroup));
   }

   public void testSimpleRoleGroup()
   {
      SimpleRoleGroup srg = new SimpleRoleGroup("Roles");
      srg.addRole(new SimpleRole("aRole"));
      assertTrue(srg.containsAll(new SimpleRole("aRole")));
   }
View Full Code Here


            AssertionType assertion = SAMLUtil.fromElement(tokenElement);

            // check the assertion statements and look for role attributes.
            AttributeStatementType attributeStatement = this.getAttributeStatement(assertion);
            if (attributeStatement != null) {
                RoleGroup rolesGroup = new SimpleRoleGroup(SAML20CommonTokenRoleAttributeProvider.JBOSS_ROLE_PRINCIPAL_NAME);
                List<ASTChoiceType> attributeList = attributeStatement.getAttributes();
                for (ASTChoiceType obj : attributeList) {
                    AttributeType attribute = obj.getAttribute();
                    if (attribute != null) {
                        // if this is a role attribute, get its values and add them to the role set.
                        if (tokenRoleAttributeName.equals(attribute.getName())) {
                            for (Object value : attribute.getAttributeValue()) {
                                rolesGroup.addRole(new SimpleRole((String) value));
                            }
                        }
                    }
                }
                result.setMappedObject(rolesGroup);
View Full Code Here

TOP

Related Classes of org.jboss.security.identity.plugins.SimpleRoleGroup

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.