|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gdata.client.authn.oauth.OAuthUtil
public class OAuthUtil
A general container for methods related to OAuth.
Method Summary | |
---|---|
static java.lang.String |
encode(java.lang.String stringToEncode)
Formats the input string for inclusion in a url. |
static java.lang.String |
getNonce()
Get a nonce for an OAuth request. |
static java.lang.String |
getSignatureBaseString(java.lang.String requestUrl,
java.lang.String httpMethod,
java.util.Map<java.lang.String,java.lang.String> baseParameters)
Calculates the signature base url as per section 9.1 of the OAuth Spec. |
static java.lang.String |
getTimestamp()
Get a timestamp for an OAuth request. |
static java.lang.String |
normalizeParameters(java.lang.String requestUrl,
java.util.Map<java.lang.String,java.lang.String> requestParameters)
Calculates the normalized request parameters string to use in the base string, as per section 9.1.1 of the OAuth Spec. |
static java.lang.String |
normalizeUrl(java.lang.String requestUrl)
Calculates the normalized request url, as per section 9.1.2 of the OAuth Spec. |
static java.util.Map<java.lang.String,java.lang.String> |
parseQuerystring(java.lang.String queryString)
Parse a querystring into a map of key/value pairs. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getNonce()
public static java.lang.String getTimestamp()
public static java.lang.String getSignatureBaseString(java.lang.String requestUrl, java.lang.String httpMethod, java.util.Map<java.lang.String,java.lang.String> baseParameters) throws OAuthException
requestUrl
- the url of the requesthttpMethod
- the http method, for example "GET" or "PUT"baseParameters
- the request parameters (see section 9.1.3)
OAuthException
- if the input url is not formatted properlypublic static java.lang.String normalizeUrl(java.lang.String requestUrl) throws OAuthException
requestUrl
- the request url to normalize (not null
)
OAuthException
- if the input url is not formatted properlypublic static java.lang.String normalizeParameters(java.lang.String requestUrl, java.util.Map<java.lang.String,java.lang.String> requestParameters)
requestUrl
- the request url to normalize (not null
)requestParameters
- key/value pairs of parameters in the request
public static java.util.Map<java.lang.String,java.lang.String> parseQuerystring(java.lang.String queryString)
queryString
- the string to parse (without the '?')
public static java.lang.String encode(java.lang.String stringToEncode)
stringToEncode
- the string to encode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |