org.jboss.resteasy.security.doseta
Class DigitalSigningInterceptor

java.lang.Object
  extended by org.jboss.resteasy.security.doseta.DigitalSigningInterceptor
All Implemented Interfaces:
ClientExecutionInterceptor, MessageBodyWriterInterceptor, PostProcessInterceptor

@Provider
public class DigitalSigningInterceptor
extends Object
implements MessageBodyWriterInterceptor, ClientExecutionInterceptor, PostProcessInterceptor

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
DigitalSigningInterceptor()
           
 
Method Summary
 ClientResponse execute(ClientExecutionContext context)
           
protected  List<DKIMSignature> getHeaders(MultivaluedMap<String,Object> headers)
           
 void postProcess(ServerResponse response)
           
protected  void sign(KeyRepository repository, MultivaluedMap<String,Object> headers, byte[] body, DKIMSignature dosetaSignature)
           
 void write(MessageBodyWriterContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DigitalSigningInterceptor

public DigitalSigningInterceptor()
Method Detail

getHeaders

protected List<DKIMSignature> getHeaders(MultivaluedMap<String,Object> headers)

execute

public ClientResponse execute(ClientExecutionContext context)
                       throws Exception
Specified by:
execute in interface ClientExecutionInterceptor
Throws:
Exception

postProcess

public void postProcess(ServerResponse response)
Specified by:
postProcess in interface PostProcessInterceptor

write

public void write(MessageBodyWriterContext context)
           throws IOException,
                  WebApplicationException
Specified by:
write in interface MessageBodyWriterInterceptor
Throws:
IOException
WebApplicationException

sign

protected void sign(KeyRepository repository,
                    MultivaluedMap<String,Object> headers,
                    byte[] body,
                    DKIMSignature dosetaSignature)
             throws NoSuchAlgorithmException,
                    InvalidKeyException,
                    SignatureException,
                    UnsupportedEncodingException
Throws:
NoSuchAlgorithmException
InvalidKeyException
SignatureException
UnsupportedEncodingException


Copyright © 2012. All Rights Reserved.