de.aitools.aq.websearch.oauth
Class OAuth
java.lang.Object
de.aitools.aq.websearch.oauth.OAuth
public abstract class OAuth
- extends java.lang.Object
The OAuth protocol (http://oauth.net/) is used by some services such as
Yahoo and Twitter for authorization purposes. In order to avoid to refer to
existing external Java libraries (e.g. Scribe and Signpost), we've
implemented the OAuth workflow, again. The current implementation is very
basic, because it is primarily written for Yahoo. The implementation bases on
Signpost, but uses Java built-in classes instead.
- Version:
- $Id: OAuth.java,v 1.2 2012/05/09 13:42:37 hoppe Exp $
- Author:
- dennis.hoppe(/\t)uni-weimar.de
Constructor Summary |
OAuth()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCODING
public static final java.lang.String ENCODING
- See Also:
- Constant Field Values
HMAC
public static final java.lang.String HMAC
- See Also:
- Constant Field Values
HTTP_AUTHORIZATION_HEADER
public static final java.lang.String HTTP_AUTHORIZATION_HEADER
- See Also:
- Constant Field Values
OAUTH_CONSUMER_KEY
public static final java.lang.String OAUTH_CONSUMER_KEY
- See Also:
- Constant Field Values
OAUTH_HASHMETHOD
public static final java.lang.String OAUTH_HASHMETHOD
- See Also:
- Constant Field Values
OAUTH_NONCE
public static final java.lang.String OAUTH_NONCE
- See Also:
- Constant Field Values
OAUTH_PREFIX
public static final java.lang.String OAUTH_PREFIX
- See Also:
- Constant Field Values
OAUTH_SIGNATURE
public static final java.lang.String OAUTH_SIGNATURE
- See Also:
- Constant Field Values
OAUTH_SIGNATURE_METHOD
public static final java.lang.String OAUTH_SIGNATURE_METHOD
- See Also:
- Constant Field Values
OAUTH_TIMESTAMP
public static final java.lang.String OAUTH_TIMESTAMP
- See Also:
- Constant Field Values
OAUTH_VERSION
public static final java.lang.String OAUTH_VERSION
- See Also:
- Constant Field Values
REQUEST_METHOD
public static final java.lang.String REQUEST_METHOD
- See Also:
- Constant Field Values
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
OAuth
public OAuth()
addOAuthParameters
public static void addOAuthParameters(HttpParameters httpParameters,
java.lang.String consumer_key)
- Parameters:
httpParameters
- consumer_key
-
signMessage
public static java.lang.String signMessage(java.lang.String httpRequestURL,
HttpParameters httpParameters,
java.lang.String consumer_secret,
Decoder decoder)
- Parameters:
httpRequest
- httpParameters
- consumer_secret
- decoder
-
- Returns:
-
- Throws:
OAuthMessageSignerException
getAuthRequest
public static java.lang.String getAuthRequest(java.lang.String httpRequestURL,
HttpParameters requestParameters,
Decoder decoder)
- Parameters:
httpRequestURL
- requestParameters
-
- Returns:
-
- Throws:
OAuthMessageSignerException
- See Also:
http://code.google.com/p/oauth-signpost/}
normalizeRequestUrl
public static java.lang.String normalizeRequestUrl(java.lang.String requestUrl)
throws java.net.URISyntaxException
- Parameters:
requestUrl
-
- Returns:
-
- Throws:
java.net.URISyntaxException
- See Also:
http://code.google.com/p/oauth-signpost/}
normalizeRequestParameters
public static java.lang.String normalizeRequestParameters(HttpParameters requestParameters)
throws java.io.IOException
- Parameters:
requestParameters
-
- Returns:
-
- Throws:
java.io.IOException
- See Also:
http://code.google.com/p/oauth-signpost/}