| java.lang.Object | |
| ↳ | com.ning.http.client.oauth.OAuthSignatureCalculator |
Simple OAuth signature calculator that can used for constructing client signatures for accessing services that use OAuth for authorization.
Supports most common signature inclusion and calculation methods: HMAC-SHA1 for calculation, and Header inclusion as inclusion method. Nonce generation uses simple random numbers with base64 encoding.| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | HEADER_AUTHORIZATION | ||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| consumerAuth | |||||||||||
| mac | |||||||||||
| nonceBuffer | |||||||||||
| random | To generate Nonce, need some (pseudo)randomness; no need for secure variant here. | ||||||||||
| userAuth | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Method called when
build() method is called. | |||||||||||
Method for calculating OAuth signature using HMAC/SHA-1 method.
| |||||||||||
Method used for constructing
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.ning.http.client.SignatureCalculator
| |||||||||||
To generate Nonce, need some (pseudo)randomness; no need for secure variant here.
| consumerAuth | Consumer key to use for signature calculation |
|---|---|
| userAuth | Request/access token to use for signature calculation |
Method called when build() method is called.
Should first calculate signature information and then modify request
(using passed RequestBuilder) to add signature (usually as
an HTTP header).
| request | Request that is being built; needed to access content to be signed |
|---|---|
| requestBuilder | builder that can be used to modify request, usually by adding header that includes calculated signature. Be sure NOT to call RequestBuilder#build since this will cause infinite recursion |
Method for calculating OAuth signature using HMAC/SHA-1 method.
Method used for constructing