Class DigitalSigningInterceptor
java.lang.Object
org.jboss.resteasy.security.doseta.DigitalSigningInterceptor
- All Implemented Interfaces:
jakarta.ws.rs.client.ClientRequestFilter
,jakarta.ws.rs.container.ContainerResponseFilter
,jakarta.ws.rs.ext.WriterInterceptor
,AsyncWriterInterceptor
@Provider
@Priority(4000)
public class DigitalSigningInterceptor
extends Object
implements AsyncWriterInterceptor, jakarta.ws.rs.container.ContainerResponseFilter, jakarta.ws.rs.client.ClientRequestFilter
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
aroundWriteTo
(jakarta.ws.rs.ext.WriterInterceptorContext context) Interceptor method wrapping calls toAsyncMessageBodyWriter.asyncWriteTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, org.jboss.resteasy.spi.AsyncOutputStream)
method.void
filter
(jakarta.ws.rs.client.ClientRequestContext requestContext) void
filter
(jakarta.ws.rs.container.ContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseContext responseContext) protected List
<DKIMSignature> getHeaders
(jakarta.ws.rs.core.MultivaluedMap<String, Object> headers) protected void
sign
(KeyRepository repository, jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, byte[] body, DKIMSignature dosetaSignature)
-
Constructor Details
-
DigitalSigningInterceptor
public DigitalSigningInterceptor()
-
-
Method Details
-
getHeaders
-
filter
- Specified by:
filter
in interfacejakarta.ws.rs.client.ClientRequestFilter
- Throws:
IOException
-
filter
public void filter(jakarta.ws.rs.container.ContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseContext responseContext) throws IOException - Specified by:
filter
in interfacejakarta.ws.rs.container.ContainerResponseFilter
- Throws:
IOException
-
aroundWriteTo
public void aroundWriteTo(jakarta.ws.rs.ext.WriterInterceptorContext context) throws IOException, jakarta.ws.rs.WebApplicationException - Specified by:
aroundWriteTo
in interfacejakarta.ws.rs.ext.WriterInterceptor
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-
asyncAroundWriteTo
Description copied from interface:AsyncWriterInterceptor
Interceptor method wrapping calls toAsyncMessageBodyWriter.asyncWriteTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], jakarta.ws.rs.core.MediaType, jakarta.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, org.jboss.resteasy.spi.AsyncOutputStream)
method. The parameters of the wrapped method called are available fromcontext
. Implementations of this method SHOULD explicitly callAsyncWriterInterceptorContext.asyncProceed()
to invoke the next interceptor in the chain, and ultimately the wrappedAsyncMessageBodyWriter.asyncWriteTo
method.- Specified by:
asyncAroundWriteTo
in interfaceAsyncWriterInterceptor
- Parameters:
context
- invocation context.- Returns:
- a
CompletionStage
indicating completion
-
sign
protected void sign(KeyRepository repository, jakarta.ws.rs.core.MultivaluedMap<String, Object> headers, byte[] body, DKIMSignature dosetaSignature) throws NoSuchAlgorithmException, InvalidKeyException, SignatureException, UnsupportedEncodingException
-