Examples of RTChoiceType


Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

            } else if (JBossSAMLConstants.SIGNATURE.get().equals(elementName)) {
                Element sig = StaxParserUtil.getDOMElement(xmlEventReader);
                response.setSignature(sig);
            } else if (JBossSAMLConstants.ASSERTION.get().equals(elementName)) {
                SAMLAssertionParser assertionParser = new SAMLAssertionParser();
                response.addAssertion(new RTChoiceType((AssertionType) assertionParser.parse(xmlEventReader)));
            } else if (JBossSAMLConstants.STATUS.get().equals(elementName)) {
                response.setStatus(parseStatus(xmlEventReader));
            } else if (JBossSAMLConstants.ENCRYPTED_ASSERTION.get().equals(elementName)) {
                Element encryptedAssertion = StaxParserUtil.getDOMElement(xmlEventReader);
                response.addAssertion(new RTChoiceType(new EncryptedAssertionType(encryptedAssertion)));
            } else
                throw logger.parserUnknownTag(elementName, startElement.getLocation());
        }

        return response;
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        if (statusCode == null)
            throw logger.issuerInfoMissingStatusCodeError();

        responseType.setStatus(createStatusType(statusCode));

        responseType.addAssertion(new RTChoiceType(assertionType));
        return responseType;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        if (statusCode == null)
            throw logger.issuerInfoMissingStatusCodeError();

        responseType.setStatus(createStatusType(statusCode));

        responseType.addAssertion(new RTChoiceType(new EncryptedAssertionType(encryptedAssertion)));
        return responseType;
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        Element docElement = XMLEncryptionUtil.encryptElementInDocument(responseDoc, kp.getPublic(), sk, 128, assertionQName,
                true);

        InputStream is = DocumentUtil.getNodeAsStream(docElement);
        EncryptedAssertionType eet = sr.getEncryptedAssertion(is);
        rt.addAssertion(new RTChoiceType(eet));

        RTChoiceType choiceType = rt.getAssertions().get(1);
        EncryptedAssertionType encryptedAssertionType = choiceType.getEncryptedAssertion();

        Document eetDoc = sr.convert(encryptedAssertionType);

        Element decryptedDocumentElement = XMLEncryptionUtil.decryptElementInDocument(eetDoc, kp.getPrivate());
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        ResponseType response = (ResponseType) parser.parse(configStream);
        assertNotNull("ResponseType is not null", response);

        List<RTChoiceType> choices = response.getAssertions();
        assertEquals(1, choices.size());
        RTChoiceType rtc = choices.get(0);
        AssertionType assertion = rtc.getAssertion();
        Set<StatementAbstractType> statements = assertion.getStatements();
        for (StatementAbstractType statement : statements) {
            if (statement instanceof AuthnStatementType) {
                AuthnStatementType authnStat = (AuthnStatementType) statement;
                AuthnContextType authnContext = authnStat.getAuthnContext();
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        assertNotNull(is);
        SAMLParser parser = new SAMLParser();
        ResponseType response = (ResponseType) parser.parse(is);
        List<RTChoiceType> assertionList = response.getAssertions();
        assertEquals(1, assertionList.size());
        RTChoiceType rtc = assertionList.get(0);
        AssertionType assertion = rtc.getAssertion();
        List<String> roles = AssertionUtil.getRoles(assertion, null);
        assertEquals(2, roles.size());
        assertTrue(roles.contains("manager"));
        assertTrue(roles.contains("employee"));
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

        assertNotNull(is);
        SAMLParser parser = new SAMLParser();
        ResponseType response = (ResponseType) parser.parse(is);
        List<RTChoiceType> assertionList = response.getAssertions();
        assertEquals(1, assertionList.size());
        RTChoiceType rtc = assertionList.get(0);
        AssertionType assertion = rtc.getAssertion();
        List<String> roles = AssertionUtil.getRoles(assertion, null);
        assertEquals(2, roles.size());
        assertTrue(roles.contains("manager"));
        assertTrue(roles.contains("employee"));
    }
View Full Code Here

Examples of org.picketlink.identity.federation.saml.v2.protocol.ResponseType.RTChoiceType

                JAXPValidationUtil.checkSchemaValidation(decryptedDocumentElement);
                AssertionType assertion = (AssertionType) parser.parse(StaxParserUtil.getXMLEventReader(DocumentUtil
                        .getNodeAsStream(decryptedDocumentElement)));

                responseType.replaceAssertion(oldID, new RTChoiceType(assertion));
                return responseType;
            } catch (Exception e) {
                throw logger.processingError(e);
            }
        }
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.