| 1 |
package oauth.signpost.signature; |
| 2 |
|
| 3 |
import java.io.Serializable; |
| 4 |
|
| 5 |
import oauth.signpost.http.HttpRequest; |
| 6 |
import oauth.signpost.http.HttpParameters; |
| 7 |
|
| 8 |
/** |
| 9 |
* <p> |
| 10 |
* Defines how an OAuth signature string is written to a request. |
| 11 |
* </p> |
| 12 |
* <p> |
| 13 |
* Unlike {@link OAuthMessageSigner}, which is concerned with <i>how</i> to |
| 14 |
* generate a signature, this class is concered with <i>where</i> to write it |
| 15 |
* (e.g. HTTP header or query string). |
| 16 |
* </p> |
| 17 |
* |
| 18 |
* @author Matthias Kaeppler |
| 19 |
*/ |
| 20 |
public interface SigningStrategy extends Serializable { |
| 21 |
|
| 22 |
/** |
| 23 |
* Writes an OAuth signature and all remaining required parameters to an |
| 24 |
* HTTP message. |
| 25 |
* |
| 26 |
* @param signature |
| 27 |
* the signature to write |
| 28 |
* @param request |
| 29 |
* the request to sign |
| 30 |
* @param requestParameters |
| 31 |
* the request parameters |
| 32 |
* @return whatever has been written to the request, e.g. an Authorization |
| 33 |
* header field |
| 34 |
*/ |
| 35 |
String writeSignature(String signature, HttpRequest request, HttpParameters requestParameters); |
| 36 |
|
| 37 |
} |