Examples of ASTChoiceType


Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

    public static AttributeStatementType createAttributeStatement(String attributeValue) {
        AttributeStatementType attribStatement = new AttributeStatementType();
        AttributeType att = new AttributeType(attributeValue);
        att.addAttributeValue(attributeValue);

        attribStatement.addAttribute(new ASTChoiceType(att));
        return attribStatement;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

            logger.trace("No authentication Subject found, cannot provide any user roles!");
            return null;
        } else {
            AttributeStatementType attributeStatement = new AttributeStatementType();
            AttributeType rolesAttribute = new AttributeType(tokenRoleAttributeName);
            attributeStatement.addAttribute(new ASTChoiceType(rolesAttribute));

            // List<Object> roles = rolesAttribute.getAttributeValue();
            for (Principal rolePrincipal : subject.getPrincipals()) {
                if (JBOSS_ROLE_PRINCIPAL_NAME.equalsIgnoreCase(rolePrincipal.getName())) {
                    Group simpleGroup = (Group) rolePrincipal;
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

            // Get the next start element
            startElement = StaxParserUtil.peekNextStartElement(xmlEventReader);
            String tag = startElement.getName().getLocalPart();
            if (JBossSAMLConstants.ATTRIBUTE.get().equals(tag)) {
                AttributeType attribute = parseAttribute(xmlEventReader);
                attributeStatementType.addAttribute(new ASTChoiceType(attribute));
            } else
                throw logger.parserUnknownTag(tag, startElement.getLocation());
        }
        return attributeStatementType;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

        AttributeStatementType attributeStatement = (AttributeStatementType) statementAbstractType;
        List<ASTChoiceType> attributes = attributeStatement.getAttributes();
        assertFalse("Unexpected empty list of attributes", attributes.isEmpty());
        assertEquals("Unexpected number of attributes", 1, attributes.size());
        Object attributeObject = attributes.iterator().next();
        ASTChoiceType astChoice = (ASTChoiceType) attributeObject;
        AttributeType attribute = astChoice.getAttribute();
        /*
         * assertTrue("Unexpected type instead of AttributeStatement: " + attributeObject.getClass().getSimpleName(),
         * attributeObject instanceof AttributeType); AttributeType attribute = (AttributeType)attributeObject;
         */
        assertEquals("Unexpected name for the role attribute", "roleAttributeName", attribute.getName());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

        AssertionType assertion = new AssertionType("ID_SOME", XMLTimeUtil.getIssueInstant());
        AttributeStatementType attributeStatementType = new AttributeStatementType();
        assertion.addStatement(attributeStatementType);
        AttributeType attributeType = new AttributeType(roleAttributeName);
        attributeStatementType.addAttribute(new ASTChoiceType(attributeType));
        attributeType.addAttributeValue(role1);
        attributeType.addAttributeValue(role2);

        MappingResult<RoleGroup> mappingResult = new MappingResult<RoleGroup>();
        Map<String, Object> contextMap = new HashMap<String, Object>();
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

        AttributeType attribute = new AttributeType("Role");

        attribute.addAttributeValue("Manager");

        attributes.addAttribute(new ASTChoiceType(attribute));

        assertion.addStatement(attributes);

        id = IDGenerator.create("ID_"); // regenerate
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

                    att.setFriendlyName(key);
                    att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_URI.get());
                }

                att.addAttributeValue(value);
                attrStatement.addAttribute(new ASTChoiceType(att));
            }
        }
        return attrStatement;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

            if(attrStatement == null){
                attrStatement = new AttributeStatementType();
            }
            AttributeType attr = new AttributeType(AttributeConstants.ROLE_IDENTIFIER_ASSERTION);
            attr.addAttributeValue(role);
            attrStatement.addAttribute(new ASTChoiceType(attr));
        }
        return attrStatement;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

        AttributeStatementType attrStatement = new AttributeStatementType();
        AttributeType attr = new AttributeType(AttributeConstants.ROLE_IDENTIFIER_ASSERTION);
        for (String role : roles) {
            attr.addAttributeValue(role);
        }
        attrStatement.addAttribute(new ASTChoiceType(attr));
        return attrStatement;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.assertion.AttributeStatementType.ASTChoiceType

     */
    public static AttributeStatementType createAttributeStatement(String key, String value) {
        AttributeStatementType attrStatement = new AttributeStatementType();
        AttributeType attr = new AttributeType(key);
        attr.addAttributeValue(value);
        attrStatement.addAttribute(new ASTChoiceType(attr));

        return attrStatement;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.