| java.lang.Object | |
| ↳ | com.google.gdata.client.authn.oauth.OAuthUtil |
A general container for methods related to OAuth.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Formats the input string for inclusion in a url.
| |||||||||||
Get a nonce for an OAuth request.
| |||||||||||
Calculates the signature base url as per section 9.1 of the OAuth Spec.
| |||||||||||
Get a timestamp for an OAuth request.
| |||||||||||
Calculates the normalized request parameters string to use in the base
string, as per section 9.1.1 of the OAuth Spec.
| |||||||||||
Calculates the normalized request url, as per section 9.1.2 of the OAuth
Spec.
| |||||||||||
Parse a querystring into a map of key/value pairs.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Formats the input string for inclusion in a url. Account for the differences in how OAuth encodes certain characters (such as the space character).
| stringToEncode | The string to encode |
|---|
Get a nonce for an OAuth request. OAuth defines the nonce as "a random string, uniquely generated for each request. The nonce allows the Service Provider to verify that a request has never been made before and helps prevent replay attacks when requests are made over a non-secure channel (such as HTTP)."
Calculates the signature base url as per section 9.1 of the OAuth Spec. This is a concatenation of http method, request url, and other request parameters.
| requestUrl | The url of the request |
|---|---|
| httpMethod | 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 properly |
|---|
Get a timestamp for an OAuth request. OAuth defines the timestamp as "the number of seconds since January 1, 1970 00:00:00 GMT. The timestamp value MUST be a positive integer and MUST be equal or greater than the timestamp used in previous requests."
Calculates the normalized request parameters string to use in the base string, as per section 9.1.1 of the OAuth Spec.
| requestUrl | The request url to normalize (not null) |
|---|---|
| requestParameters | Key/value pairs of parameters in the request |
Calculates the normalized request url, as per section 9.1.2 of the OAuth Spec. This removes the querystring from the url and the port (if it is the standard http or https port).
| requestUrl | The request url to normalize (not null) |
|---|
| OAuthException | if the input url is not formatted properly |
|---|
Parse a querystring into a map of key/value pairs.
| queryString | The string to parse (without the '?') |
|---|