Home | History | Annotate | Download | only in client

Lines Matching defs:oauth

17 package net.oauth.client;
29 import net.oauth.OAuth;
30 import net.oauth.OAuthAccessor;
31 import net.oauth.OAuthConsumer;
32 import net.oauth.OAuthException;
33 import net.oauth.OAuthMessage;
34 import net.oauth.OAuthProblemException;
35 import net.oauth.http.HttpClient;
36 import net.oauth.http.HttpMessage;
37 import net.oauth.http.HttpMessageDecoder;
38 import net.oauth.http.HttpResponseMessage;
41 * Methods for an OAuth consumer to request tokens from a service provider.
58 * handled at the HTTP level, if the second request must carry another OAuth
144 // described in http://oauth.pbwiki.com/AccessorSecret
151 p.add(new OAuth.Parameter("oauth_accessor_secret",
159 accessor.requestToken = response.getParameter(OAuth.OAUTH_TOKEN);
160 accessor.tokenSecret = response.getParameter(OAuth.OAUTH_TOKEN_SECRET);
161 response.requireParameters(OAuth.OAUTH_TOKEN, OAuth.OAUTH_TOKEN_SECRET);
187 parameters = OAuth.newList(OAuth.OAUTH_TOKEN, accessor.requestToken);
188 } else if (!OAuth.newMap(parameters).containsKey(OAuth.OAUTH_TOKEN)) {
190 p.add(new OAuth.Parameter(OAuth.OAUTH_TOKEN, accessor.requestToken));
196 response.requireParameters(OAuth.OAUTH_TOKEN, OAuth.OAUTH_TOKEN_SECRET);
197 accessor.accessToken = response.getParameter(OAuth.OAUTH_TOKEN);
198 accessor.tokenSecret = response.getParameter(OAuth.OAUTH_TOKEN_SECRET);
276 url = OAuth.addParameters(url, request.getParameters());
279 byte[] form = OAuth.formEncode(request.getParameters()).getBytes(
281 headers.add(new OAuth.Parameter(HttpMessage.CONTENT_TYPE,
282 OAuth.FORM_ENCODED));
283 headers.add(new OAuth.Parameter(CONTENT_LENGTH, form.length + ""));
288 headers.add(new OAuth.Parameter("Authorization", request.getAuthorizationHeader(null)));
289 // Find the non-OAuth parameters:
299 // Place the non-OAuth parameters elsewhere in the request:
301 byte[] form = OAuth.formEncode(others).getBytes(
303 headers.add(new OAuth.Parameter(HttpMessage.CONTENT_TYPE,
304 OAuth.FORM_ENCODED));
305 headers.add(new OAuth.Parameter(CONTENT_LENGTH, form.length
309 url = OAuth.addParameters(url, others);