Examples of JwtTokenReaderWriter


Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

        super(token.getHeaders(), w, serializeClaims(token.getClaims(), w));
    }
   
    private static String serializeClaims(JwtClaims claims, JwtTokenWriter writer) {
        if (writer == null) {
            writer = new JwtTokenReaderWriter();
        }
        return writer.claimsToJson(claims);
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

    }
    public JwsJwtCompactConsumer(String encodedJws, JwtTokenReader r) {
        this(encodedJws, null, r);
    }
    public JwsJwtCompactConsumer(String encodedJws, JwsSignatureProperties props, JwtTokenReader r) {
        super(encodedJws, props, r == null ? new JwtTokenReaderWriter() : r);
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

    private byte[] initVector;
    private byte[] encryptedContentWithTag;
    private byte[] authTag;
    private JweHeaders jweHeaders;
    public JweCompactConsumer(String jweContent) {
        this(jweContent, new JwtTokenReaderWriter());
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

    public static StringBuilder startJweContent(StringBuilder sb,
                                        JweHeaders headers,
                                        JwtHeadersWriter writer,
                                        byte[] encryptedContentEncryptionKey,
                                        byte[] cipherInitVector) {
        writer = writer == null ? new JwtTokenReaderWriter() : writer;
        String encodedHeaders = Base64UrlUtility.encode(writer.headersToJson(headers));
        String encodedContentEncryptionKey = Base64UrlUtility.encode(encryptedContentEncryptionKey);
        String encodedInitVector = Base64UrlUtility.encode(cipherInitVector);
        sb.append(encodedHeaders)
            .append('.')
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

    public static void startJweContent(OutputStream os,
                                       JweHeaders headers,
                                       JwtHeadersWriter writer,
                                       byte[] encryptedContentEncryptionKey,
                                       byte[] cipherInitVector) throws IOException {
        writer = writer == null ? new JwtTokenReaderWriter() : writer;
        byte[] jsonBytes = writer.headersToJson(headers).getBytes("UTF-8");
        Base64UrlUtility.encodeAndStream(jsonBytes, 0, jsonBytes.length, os);
        byte[] dotBytes = new byte[]{'.'};
        os.write(dotBytes);
        Base64UrlUtility.encodeAndStream(encryptedContentEncryptionKey, 0,
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jwt.JwtTokenReaderWriter

        return new JwsJwtCompactProducer(token, getWriter());
    }

   
    private JwtTokenWriter getWriter() {
        JwtTokenReaderWriter jsonWriter = new JwtTokenReaderWriter();
        jsonWriter.setFormat(true);
        return jsonWriter;
    }
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.