| java.lang.Object | |
| ↳ | org.apache.oltu.oauth2.common.utils.OAuthUtils |
Common OAuth Utils class.
Some methods based on the Utils class from OAuth V1.0a library available at: http://oauth.googlecode.com/svn/code/java/core/| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | AUTH_SCHEME | ||||||||||
| String | MULTIPART | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Decodes the Basic Authentication header into a username and password
| |||||||||||
Parse a form-urlencoded document.
| |||||||||||
Construct an Authorization Bearer header
| |||||||||||
Construct a WWW-Authenticate header
| |||||||||||
Translates parameters into
application/x-www-form-urlencoded String | |||||||||||
Creates OAuthProblemException that contains set of missing oauth parameters
| |||||||||||
Creates invalid_request exception with given message
| |||||||||||
Return true if the given Content-Type header means FORM_ENCODED.
| |||||||||||
Construct a &-separated list of the given values, percentEncoded.
| |||||||||||
Read data from Input Stream and save it as a String.
| |||||||||||
Get the entity content as a String, using the provided default character set
if none is found in the entity.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Decodes the Basic Authentication header into a username and password
| authenticationHeader | String containing the encoded header value.
e.g. "Basic dXNlcm5hbWU6cGFzc3dvcmQ=" |
|---|
Construct an Authorization Bearer header
Construct a WWW-Authenticate header
Translates parameters into application/x-www-form-urlencoded String
| parameters | parameters to encode |
|---|---|
| encoding | The name of a supported character encoding. |
Creates OAuthProblemException that contains set of missing oauth parameters
| missingParams | missing oauth parameters |
|---|
Creates invalid_request exception with given message
| message | error message |
|---|
| OAuthSystemException |
|---|
Return true if the given Content-Type header means FORM_ENCODED.
Construct a &-separated list of the given values, percentEncoded.
Read data from Input Stream and save it as a String.
| is | InputStream to be read |
|---|
| IOException |
|---|
Get the entity content as a String, using the provided default character set if none is found in the entity. If defaultCharset is null, the default "UTF-8" is used.
| is | input stream to be saved as string |
|---|---|
| defaultCharset | character set to be applied if none found in the entity |
| IllegalArgumentException | if entity is null or if content length > Integer.MAX_VALUE |
|---|---|
| IOException | if an error occurs reading the input stream |