Changeset 10831 in josm for trunk/src/oauth/signpost/OAuthConsumer.java
- Timestamp:
- 2016-08-18T00:21:03+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/oauth/signpost/OAuthConsumer.java ¶
r6849 r10831 25 25 import oauth.signpost.signature.HmacSha1MessageSigner; 26 26 import oauth.signpost.signature.OAuthMessageSigner; 27 import oauth.signpost.signature.PlainTextMessageSigner;28 27 import oauth.signpost.signature.QueryStringSigningStrategy; 29 28 import oauth.signpost.signature.SigningStrategy; … … 38 37 * HTTP messages are signed as follows: 39 38 * <p> 40 * 39 * 41 40 * <pre> 42 41 * // exchange the arguments with the actual token/secret pair 43 42 * OAuthConsumer consumer = new DefaultOAuthConsumer("1234", "5678"); 44 * 43 * 45 44 * URL url = new URL("http://example.com/protected.xml"); 46 45 * HttpURLConnection request = (HttpURLConnection) url.openConnection(); 47 * 46 * 48 47 * consumer.sign(request); 49 * 48 * 50 49 * request.connect(); 51 50 * </pre> 52 * 51 * 53 52 * </p> 54 53 * </p> 55 * 54 * 56 55 * @author Matthias Kaeppler 57 56 */ … … 61 60 * Sets the message signer that should be used to generate the OAuth 62 61 * signature. 63 * 62 * 64 63 * @param messageSigner 65 64 * the signer 66 65 * @see HmacSha1MessageSigner 67 * @see PlainTextMessageSigner68 66 */ 69 67 public void setMessageSigner(OAuthMessageSigner messageSigner); … … 79 77 * as-is. <b>BE CAREFUL WITH THIS METHOD! Your service provider may decide 80 78 * to ignore any non-standard OAuth params when computing the signature.</b> 81 * 79 * 82 80 * @param additionalParameters 83 81 * the parameters … … 88 86 * Defines which strategy should be used to write a signature to an HTTP 89 87 * request. 90 * 88 * 91 89 * @param signingStrategy 92 90 * the strategy … … 102 100 * {@link OAuthProvider#retrieveRequestToken}, try setting this to true. 103 101 * </p> 104 * 102 * 105 103 * @param enable 106 104 * true or false … … 112 110 * required OAuth parameters) to it. Where these parameters are written 113 111 * depends on the current {@link SigningStrategy}. 114 * 112 * 115 113 * @param request 116 114 * the request to sign … … 132 130 * implementation must ensure that only those request types are passed which 133 131 * it supports. 134 * 132 * 135 133 * @param request 136 134 * the request to sign … … 152 150 * request that is being sent. 153 151 * </p> 154 * 152 * 155 153 * @param url 156 154 * the input URL. May have query parameters. … … 166 164 /** 167 165 * Sets the OAuth token and token secret used for message signing. 168 * 166 * 169 167 * @param token 170 168 * the token … … 189 187 * is the exact set of parameters that were used for creating the message 190 188 * signature. 191 * 189 * 192 190 * @return the request parameters used for message signing 193 191 */
Note:
See TracChangeset
for help on using the changeset viewer.