You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oltu.apache.org by si...@apache.org on 2010/07/09 14:54:58 UTC

svn commit: r962511 - /incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java

Author: simonetripodi
Date: Fri Jul  9 12:54:57 2010
New Revision: 962511

URL: http://svn.apache.org/viewvc?rev=962511&view=rev
Log:
added missing token in the methods signature

Modified:
    incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java

Modified: incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java
URL: http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java?rev=962511&r1=962510&r2=962511&view=diff
==============================================================================
--- incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java (original)
+++ incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/signature/SignatureMethod.java Fri Jul  9 12:54:57 2010
@@ -17,6 +17,7 @@
 package org.apache.amber.signature;
 
 import org.apache.amber.OAuthRequest;
+import org.apache.amber.OAuthToken;
 
 /**
  * Common definition of OAuth signature method algorithm.
@@ -36,23 +37,30 @@ public interface SignatureMethod {
      * Calculates the OAuth request message signature.
      *
      * @param signingKey the key has to be used to sign the request.
+     * @param token the received OAuth token, can be {@code null} if clients
+     *        are requesting for the authorization token.
      * @param request the OAuth request message has to be signed.
      * @return the calculated signature.
      * @throws SignatureException if any error occurs.
      */
-    String calculate(SigningKey signingKey, OAuthRequest request) throws SignatureException;
+    String calculate(SigningKey signingKey,
+            OAuthToken token,
+            OAuthRequest request) throws SignatureException;
 
     /**
      * Verifies the OAuth request message signature.
      *
      * @param signature the OAuth signature has to be verified.
      * @param verifyingKey the key has to be used to verify the request.
+     * @param token the received OAuth token, can be {@code null} if clients
+     *        are requesting for the authorization token.
      * @param request the signed OAuth request message.
      * @return true if the signature is correct, false otherwise.
      * @throws SignatureException if any error occurs.
      */
     boolean verify(String signature,
             VerifyingKey verifyingKey,
+            OAuthToken token,
             OAuthRequest request) throws SignatureException;
 
 }