Package org.picketlink.identity.federation.core.saml.v2.holders

Examples of org.picketlink.identity.federation.core.saml.v2.holders.IssuerInfoHolder


        List<Object> list = cancelTarget.getAny();

        for (Object cancelTargetObj : list) {
            if (cancelTargetObj instanceof AssertionType) {
                AssertionType assertion = (AssertionType) cancelTargetObj;
                SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
                samlAssertionWriter.write(assertion);
            } else if (cancelTargetObj instanceof Element) {
                StaxUtil.writeDOMElement(writer, (Element) cancelTargetObj);
            } else
                throw logger.writerUnknownTypeError(cancelTargetObj.getClass().getName());
        }
View Full Code Here


                    WSTrustConstants.BASE_NAMESPACE);
            List<Object> theList = response.getRequestedSecurityToken().getAny();
            for (Object securityToken : theList) {
                if (securityToken instanceof AssertionType) {
                    AssertionType assertion = (AssertionType) securityToken;
                    SAMLAssertionWriter samlAssertionWriter = new SAMLAssertionWriter(this.writer);
                    samlAssertionWriter.write(assertion);
                } else if (securityToken instanceof Element) {
                    StaxUtil.writeDOMElement(this.writer, (Element) securityToken);
                } else
                    throw logger.writerUnknownTypeError(securityToken.getClass().getName());
            }
View Full Code Here

     * @throws ConfigurationException
     */
    public Document convert(RequestAbstractType rat) throws ProcessingException, ConfigurationException, ParsingException {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        SAMLRequestWriter writer = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(bos));
        if (rat instanceof AuthnRequestType) {
            writer.write((AuthnRequestType) rat);
        } else if (rat instanceof LogoutRequestType) {
            writer.write((LogoutRequestType) rat);
        }

        return DocumentUtil.getDocument(new String(bos.toByteArray()));
    }
View Full Code Here

     * @param requestType
     * @param os
     * @throws SAXException
     */
    public void marshall(RequestAbstractType requestType, OutputStream os) throws ProcessingException {
        SAMLRequestWriter samlRequestWriter = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(os));
        if (requestType instanceof AuthnRequestType) {
            samlRequestWriter.write((AuthnRequestType) requestType);
        } else if (requestType instanceof LogoutRequestType) {
            samlRequestWriter.write((LogoutRequestType) requestType);
        } else
            throw logger.unsupportedType(requestType.getClass().getName());
    }
View Full Code Here

     * @param requestType
     * @param writer
     * @throws SAXException
     */
    public void marshall(RequestAbstractType requestType, Writer writer) throws ProcessingException {
        SAMLRequestWriter samlRequestWriter = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(writer));
        if (requestType instanceof AuthnRequestType) {
            samlRequestWriter.write((AuthnRequestType) requestType);
        } else if (requestType instanceof LogoutRequestType) {
            samlRequestWriter.write((LogoutRequestType) requestType);
        } else
            throw logger.unsupportedType(requestType.getClass().getName());
    }
View Full Code Here

        assertEquals("https://idp.example.org/SAML2", artifactResolve.getIssuer().getValue());
        assertEquals("AAQAAMh48/1oXIM+sDo7Dh2qMp1HM4IF5DaRNmDj6RdUmllwn9jJHyEgIi8=", artifactResolve.getArtifact());

        // Try out writing
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SAMLRequestWriter writer = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(baos));
        writer.write(artifactResolve);

        ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
        Document doc = DocumentUtil.getDocument(bis); // throws exceptions
        JAXPValidationUtil.validate(DocumentUtil.getNodeAsStream(doc));
    }
View Full Code Here

        assertEquals("urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", nameIDPolicy.getFormat().toString());
        assertEquals(Boolean.TRUE, nameIDPolicy.isAllowCreate());

        // Try out writing
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SAMLRequestWriter writer = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(baos));
        writer.write(authnRequest);

        ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
        Document doc = DocumentUtil.getDocument(bis); // throws exceptions
        JAXPValidationUtil.validate(DocumentUtil.getNodeAsStream(doc));
    }
View Full Code Here

         * assertEquals(Boolean.TRUE, nameIDPolicy.isAllowCreate());
         */

        // Try out writing
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SAMLRequestWriter writer = new SAMLRequestWriter(StaxUtil.getXMLStreamWriter(baos));
        writer.write(authnRequest);

        byte[] data = baos.toByteArray();
        Logger.getLogger(SAMLAuthnRequestParserTestCase.class).debug(new String(data));
        ByteArrayInputStream bis = new ByteArrayInputStream(data);
        Document doc = DocumentUtil.getDocument(bis); // throws exceptions
View Full Code Here

     * @return
     * @throws ParserConfigurationException
     */
    public Document convert(ResponseType responseType) throws ProcessingException, ParsingException, ConfigurationException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        SAMLResponseWriter writer = new SAMLResponseWriter(StaxUtil.getXMLStreamWriter(baos));
        writer.write(responseType);

        ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
        return DocumentUtil.getDocument(bis);
    }
View Full Code Here

            XACMLAuthzDecisionQueryType xacmlQuery = SOAPSAMLXACMLUtil.getXACMLQueryType(doc);
            ResponseType samlResponseType = SOAPSAMLXACMLUtil.handleXACMLQuery(pdp, issuer, xacmlQuery);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            XMLStreamWriter xmlStreamWriter = StaxUtil.getXMLStreamWriter(baos);

            SAMLResponseWriter samlResponseWriter = new SAMLResponseWriter(xmlStreamWriter);
            samlResponseWriter.write(samlResponseType);
            Document responseDocument = DocumentUtil.getDocument(new ByteArrayInputStream(baos.toByteArray()));

            return new DOMSource(responseDocument.getDocumentElement());
        } catch (Exception e) {
            throw logger.xacmlPDPMessageProcessingError(e);
View Full Code Here

TOP

Related Classes of org.picketlink.identity.federation.core.saml.v2.holders.IssuerInfoHolder

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.