File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1+ package org .scribe .builder .api ;
2+
3+ import org .scribe .model .Token ;
4+ import org .scribe .services .*;
5+
6+ /**
7+ * @author Julio Gutierrez
8+ *
9+ * Sep 6, 2012
10+ */
11+ public class UbuntuOneApi extends DefaultApi10a
12+ {
13+
14+ private static final String AUTHORIZATION_URL = "https://one.ubuntu.com/oauth/authorize/?oauth_token=%s" ;
15+
16+ @ Override
17+ public String getAccessTokenEndpoint ()
18+ {
19+ return "https://one.ubuntu.com/oauth/access/" ;
20+ }
21+
22+ @ Override
23+ public String getAuthorizationUrl (Token requestToken )
24+ {
25+ return String .format (AUTHORIZATION_URL , requestToken .getToken ());
26+ }
27+
28+ @ Override
29+ public String getRequestTokenEndpoint ()
30+ {
31+ return "https://one.ubuntu.com/oauth/request/" ;
32+ }
33+
34+ @ Override
35+ public SignatureService getSignatureService ()
36+ {
37+ return new PlaintextSignatureService ();
38+ }
39+
40+ }
Original file line number Diff line number Diff line change 1111 */
1212public class PlaintextSignatureService implements SignatureService
1313{
14- private static final String METHOD = "plaintext " ;
14+ private static final String METHOD = "PLAINTEXT " ;
1515
1616 /**
1717 * {@inheritDoc}
You can’t perform that action at this time.
0 commit comments