Examples of verifySignatureWith()


Examples of org.apache.cxf.rs.security.oauth2.jws.JwsCompactConsumer.verifySignatureWith()

    public void filter(ContainerRequestContext context) throws IOException {
       
        JwsSignatureVerifier theSigVerifier = getInitializedSigVerifier();
        JwsCompactConsumer p = new JwsCompactConsumer(IOUtils.readStringFromStream(context.getEntityStream()),
                                                      getSigProperties());
        p.verifySignatureWith(theSigVerifier);
        byte[] bytes = p.getDecodedJwsPayloadBytes();
        context.setEntityStream(new ByteArrayInputStream(bytes));
        context.getHeaders().putSingle("Content-Length", Integer.toString(bytes.length));
       
        String ct = JwtUtils.checkContentType(p.getJwtHeaders().getContentType(), getDefaultMediaType());
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jws.JwsCompactConsumer.verifySignatureWith()

    @Override
    public void filter(ClientRequestContext req, ClientResponseContext res) throws IOException {
        JwsSignatureVerifier theSigVerifier = getInitializedSigVerifier();
        JwsCompactConsumer p = new JwsCompactConsumer(IOUtils.readStringFromStream(res.getEntityStream()),
                                                      getSigProperties());
        p.verifySignatureWith(theSigVerifier);
        byte[] bytes = p.getDecodedJwsPayloadBytes();
        res.setEntityStream(new ByteArrayInputStream(bytes));
        res.getHeaders().putSingle("Content-Length", Integer.toString(bytes.length));
        String ct = JwtUtils.checkContentType(p.getJwtHeaders().getContentType(), getDefaultMediaType());
        if (ct != null) {
View Full Code Here

Examples of org.apache.cxf.rs.security.oauth2.jws.JwsJwtCompactConsumer.verifySignatureWith()

                             MultivaluedMap<String, String> headers, InputStream is) throws IOException,
        WebApplicationException {
        JwsSignatureVerifier theSigVerifier = getInitializedSigVerifier();
        JwsJwtCompactConsumer p = new JwsJwtCompactConsumer(IOUtils.readStringFromStream(is),
                                                      getSigProperties());
        p.verifySignatureWith(theSigVerifier);
        return p.getJwtToken();
    }
   
}
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.