Examples of JwsOutputStream


Examples of org.apache.cxf.rs.security.oauth2.jws.JwsOutputStream

            JwtHeaders headers = new JwtHeaders();
            JwsSignature jwsSignature = getInitializedSigProvider().createJwsSignature(headers);
            if (ctString != null) {
                headers.setContentType(ctString);
            }
            JwsOutputStream jwsStream = new JwsOutputStream(actualOs, jwsSignature);
            byte[] headerBytes = writer.headersToJson(headers).getBytes("UTF-8");
            Base64UrlUtility.encodeAndStream(headerBytes, 0, headerBytes.length, jwsStream);
            jwsStream.write(new byte[]{'.'});
                       
            Base64UrlOutputStream base64Stream = new Base64UrlOutputStream(jwsStream);
            ctx.setOutputStream(base64Stream);
            ctx.proceed();
            base64Stream.flush();
            jwsStream.flush();
        } else {
            CachedOutputStream cos = new CachedOutputStream();
            ctx.setOutputStream(cos);
            ctx.proceed();
           
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.