Examples of JwsSignatureVerifier


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

@Priority(Priorities.JWS_SERVER_READ_PRIORITY)
public class JwsContainerRequestFilter extends AbstractJwsReaderProvider implements ContainerRequestFilter {
    @Override
    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));
View Full Code Here

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

@Priority(Priorities.JWS_CLIENT_READ_PRIORITY)
public class JwsClientResponseFilter extends AbstractJwsReaderProvider implements ClientResponseFilter {
    @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));
View Full Code Here

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

    @Override
    public JwtToken readFrom(Class<JwtToken> cls, Type t, Annotation[] anns, MediaType mt,
                             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.