Examples of DeflateEncoderDecoder


Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        InputStream tokenStream = null;
        if (isSupportBase64Encoding()) {
            try {
                byte[] deflatedToken = Base64Utility.decode(samlResponseDecoded);
                tokenStream = !postBinding && isSupportDeflateEncoding()
                    ? new DeflateEncoderDecoder().inflateToken(deflatedToken)
                    : new ByteArrayInputStream(deflatedToken);
            } catch (Base64Exception ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
            } catch (DataFormatException ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        String requestMessage = DOM2Writer.nodeToString(authnRequest);
       
        byte[] deflatedBytes = null;
        // Not correct according to the spec but required by some IDPs.
        if (useDeflateEncoding) {
            DeflateEncoderDecoder encoder = new DeflateEncoderDecoder();
            deflatedBytes = encoder.deflateToken(requestMessage.getBytes("UTF-8"));
        } else {
            deflatedBytes = requestMessage.getBytes("UTF-8");
        }

        return Base64Utility.encode(deflatedBytes);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

    }
   
    protected String encodeAuthnRequest(Element authnRequest) throws IOException {
        String requestMessage = DOM2Writer.nodeToString(authnRequest);

        DeflateEncoderDecoder encoder = new DeflateEncoderDecoder();
        byte[] deflatedBytes = encoder.deflateToken(requestMessage.getBytes("UTF-8"));

        return Base64Utility.encode(deflatedBytes);
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        String requestMessage = DOM2Writer.nodeToString(authnRequest);
       
        byte[] deflatedBytes = null;
        // Not correct according to the spec but required by some IDPs.
        if (useDeflateEncoding) {
            DeflateEncoderDecoder encoder = new DeflateEncoderDecoder();
            deflatedBytes = encoder.deflateToken(requestMessage.getBytes("UTF-8"));
        } else {
            deflatedBytes = requestMessage.getBytes("UTF-8");
        }

        return Base64Utility.encode(deflatedBytes);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        InputStream tokenStream = null;
        if (isSupportBase64Encoding()) {
            try {
                byte[] deflatedToken = Base64Utility.decode(samlResponseDecoded);
                tokenStream = !postBinding && isSupportDeflateEncoding()
                    ? new DeflateEncoderDecoder().inflateToken(deflatedToken)
                    : new ByteArrayInputStream(deflatedToken);
            } catch (Base64Exception ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
            } catch (DataFormatException ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

    }
   
    protected String encodeAuthnRequest(Element authnRequest) throws IOException {
        String requestMessage = DOM2Writer.nodeToString(authnRequest);

        DeflateEncoderDecoder encoder = new DeflateEncoderDecoder();
        byte[] deflatedBytes = encoder.deflateToken(requestMessage.getBytes("UTF-8"));

        return Base64Utility.encode(deflatedBytes);
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        }
        InputStream tokenStream = null;
        try {
            byte[] deflatedToken = Base64Utility.decode(samlResponse);
            tokenStream = useDeflateEncoding()
                ? new DeflateEncoderDecoder().inflateToken(deflatedToken)
                : new ByteArrayInputStream(deflatedToken);
        } catch (Base64Exception ex) {
            throw new WebApplicationException(400);
        } catch (DataFormatException ex) {
            throw new WebApplicationException(400);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

   
    protected String encodeAuthnRequest(Element authnRequestElement)
        throws MarshallingException, IOException {
        String requestMessage = DOM2Writer.nodeToString(authnRequestElement);
       
        DeflateEncoderDecoder encoder = new DeflateEncoderDecoder();
        byte[] deflatedBytes = encoder.deflateToken(requestMessage.getBytes("UTF-8"));
       
        String encodedRequestMessage = Base64Utility.encode(deflatedBytes);
        return URLEncoder.encode(encodedRequestMessage, "UTF-8");
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        InputStream tokenStream = null;
        if (isSupportBase64Encoding()) {
            try {
                byte[] deflatedToken = Base64Utility.decode(samlResponseDecoded);
                tokenStream = !postBinding && isSupportDeflateEncoding()
                    ? new DeflateEncoderDecoder().inflateToken(deflatedToken)
                    : new ByteArrayInputStream(deflatedToken);
            } catch (Base64Exception ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
            } catch (DataFormatException ex) {
                throw ExceptionUtils.toBadRequestException(ex, null);
View Full Code Here

Examples of org.apache.cxf.rs.security.saml.DeflateEncoderDecoder

        InputStream tokenStream = null;
        if (isSupportBase64Encoding()) {
            try {
                byte[] deflatedToken = Base64Utility.decode(samlResponseDecoded);
                tokenStream = !postBinding && isSupportDeflateEncoding()
                    ? new DeflateEncoderDecoder().inflateToken(deflatedToken)
                    : new ByteArrayInputStream(deflatedToken);
            } catch (Base64Exception ex) {
                throw new BadRequestException(ex);
            } catch (DataFormatException ex) {
                throw new BadRequestException(ex);
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.