Examples of SAML11AttributeQueryType


Examples of org.picketlink.identity.federation.saml.v1.protocol.SAML11AttributeQueryType

            String elementName = StaxParserUtil.getStartElementName(startElement);

            if (SAML11Constants.ATTRIBUTE_QUERY.equals(elementName)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                SAML11AttributeQueryType query = SAML11ParserUtil.parseSAML11AttributeQuery(xmlEventReader);
                request.setQuery(query);
            } else if (SAML11Constants.AUTHENTICATION_QUERY.equals(elementName)) {
                startElement = StaxParserUtil.getNextStartElement(xmlEventReader);
                SAML11AuthenticationQueryType query = SAML11ParserUtil.parseSAML11AuthenticationQuery(xmlEventReader);
                request.setQuery(query);
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v1.protocol.SAML11AttributeQueryType

        SAML11QueryAbstractType query = request.getQuery();
        if (query instanceof SAML11AuthenticationQueryType) {
            SAML11AuthenticationQueryType authQuery = (SAML11AuthenticationQueryType) query;
            write(authQuery);
        } else if (query instanceof SAML11AttributeQueryType) {
            SAML11AttributeQueryType attQuery = (SAML11AttributeQueryType) query;
            write(attQuery);
        } else if (query instanceof SAML11AuthenticationQueryType) {
            SAML11AuthenticationQueryType attQuery = (SAML11AuthenticationQueryType) query;
            write(attQuery);
        } else if (query instanceof SAML11AuthorizationDecisionQueryType) {
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v1.protocol.SAML11AttributeQueryType

     * @param xmlEventReader
     * @return
     * @throws ParsingException
     */
    public static SAML11AttributeQueryType parseSAML11AttributeQuery(XMLEventReader xmlEventReader) throws ParsingException {
        SAML11AttributeQueryType query = new SAML11AttributeQueryType();
        StartElement startElement;
        // There may be additional things under subject confirmation
        while (xmlEventReader.hasNext()) {
            XMLEvent xmlEvent = StaxParserUtil.peek(xmlEventReader);
            if (xmlEvent instanceof EndElement) {
                EndElement endElement = StaxParserUtil.getNextEndElement(xmlEventReader);
                if (StaxParserUtil.matches(endElement, SAML11Constants.ATTRIBUTE_QUERY))
                    break;
                else
                    throw logger.parserUnknownEndElement(StaxParserUtil.getEndElementName(endElement));
            }

            if (xmlEvent instanceof StartElement) {
                startElement = (StartElement) xmlEvent;

                String startTag = StaxParserUtil.getStartElementName(startElement);

                if (startTag.equals(JBossSAMLConstants.SUBJECT.get())) {
                    SAML11SubjectParser parser = new SAML11SubjectParser();
                    query.setSubject((SAML11SubjectType) parser.parse(xmlEventReader));
                } else
                    throw logger.parserUnknownTag(startTag, startElement.getLocation());
            }
        }
        return query;
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v1.protocol.SAML11AttributeQueryType

        assertEquals("aaf23196-1773-2113-474a-fe114412ab72", request.getID());
        assertEquals(XMLTimeUtil.parse("2006-07-17T22:26:40Z"), request.getIssueInstant());

        SAML11QueryAbstractType query = request.getQuery();
        assertTrue(query instanceof SAML11AttributeQueryType);
        SAML11AttributeQueryType attQuery = (SAML11AttributeQueryType) query;

        SAML11SubjectType subject = attQuery.getSubject();
        SAML11SubjectType.SAML11SubjectTypeChoice choice = subject.getChoice();
        assertEquals("testID", choice.getNameID().getValue());

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        // Lets do the writing
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.