org.jboss.resteasy.tests.signature
Class SignedResource

java.lang.Object
  extended by org.jboss.resteasy.tests.signature.SignedResource

public class SignedResource
extends Object

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
SignedResource()
           
 
Method Summary
 Response badSignature()
          Example of sending a signature signed by a bad or expired key.
 String getExpiresMinute()
          Sign a message setting the expiration field of the DKIM-Signature to be 1 minute after the current time
 String getExpiresShort()
          Sign a message setting the expiration field of the DKIM-Signature to be 1 second after the current time
 String getStamp()
          Sign a returned message, but also add a timestamp to the signature calculation.
 String hello()
          Sign a returned message using a private key named "test._domainKey.samplezone.org" found in the key store.
 void post(DKIMSignature signature, String input)
          Verify a posted signature.
 Response withHeader()
          Sign a returned message using a private key named "test._domainKey.samplezone.org" found in the key store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignedResource

public SignedResource()
Method Detail

hello

public String hello()
Sign a returned message using a private key named "test._domainKey.samplezone.org" found in the key store.

Returns:

withHeader

public Response withHeader()
Sign a returned message using a private key named "test._domainKey.samplezone.org" found in the key store. A header named "custom" is included in the signature calculation. The signature header is created manually here instead of using annotations.

Returns:

post

public void post(@HeaderParam(value="DKIM-Signature")
                 DKIMSignature signature,
                 String input)
Verify a posted signature. Inject it and print it out too.

Parameters:
signature -
input -

getStamp

public String getStamp()
Sign a returned message, but also add a timestamp to the signature calculation.

Returns:

getExpiresShort

public String getExpiresShort()
Sign a message setting the expiration field of the DKIM-Signature to be 1 second after the current time

Returns:

getExpiresMinute

public String getExpiresMinute()
Sign a message setting the expiration field of the DKIM-Signature to be 1 minute after the current time

Returns:

badSignature

public Response badSignature()
                      throws Exception
Example of sending a signature signed by a bad or expired key.

Returns:
Throws:
Exception


Copyright © 2011. All Rights Reserved.