Class OAuth1Parameters
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<String,- String> 
A data structure class that represents OAuth protocol parameters.
- Author:
- Hubert A. Le Van Gong <hubert.levangong at Sun.COM>, Paul C. Bryan <pbryan@sun.com>
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringName of HTTP authorization header.static final StringName of parameter containing the callback URL.static final StringName of parameter containing the token secret.static final StringName of parameter containing the consumer key.static final StringDefault value of the callback URI that should be used during Authorization flow for Request Token request when the client is not capable of handling redirects (e.g. the client is a mobile application).static final StringName of parameter containing the nonce.static final StringName of parameter containing the protection realm.static final StringOAuth scheme in Authorization header.static final StringName of parameter containing the signature.static final StringName of parameter containing the signature method.static final StringName of parameter containing the timestamp.static final StringName of parameter containing the access/request token.static final StringName of parameter containing the token secret.static final StringName of parameter containing the verifier code.static final StringName of parameter containing the protocol version.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionBuilder pattern method to returnOAuth1Parametersafter setting callback URL.clone()consumerKey(String consumerKey) Builder pattern method to returnOAuth1Parametersafter setting consumer key.Returns the callback URL.Returns the consumer key.getNonce()Returns the nonce, a value that should be unique for a given timestamp.getRealm()Returns the protection realm for the request.Returns the signature for the request.Returns the signature method used to sign the request.Returns the timestamp, a value expected to be a positive integer, typically containing the number of seconds since January 1, 1970 00:00:00 GMT (epoch).getToken()Returns the request or access token.Returns the verifier code.Returns the protocol version.nonce()Builder pattern method to returnOAuth1Parametersafter setting nonce to a randomly-generated UUID.Builder pattern method to returnOAuth1Parametersafter setting nonce.readRequest(OAuth1Request request) Reads a request for OAuth parameters, and populates this object.Builder pattern method to returnOAuth1Parametersafter setting protection realm.voidsetCallback(String callback) Sets the callback URL.voidsetConsumerKey(String consumerKey) Sets the consumer key.voidsetNonce()Sets the nonce to contain a randomly-generated UUID.voidSets the nonce, a value that should be unique for a given timestamp.voidSets the protection realm for the request.voidsetSignature(String signature) Sets the signature for the request.voidsetSignatureMethod(String signatureMethod) Sets the signature method used to sign the request.voidSets the timestamp to the current time as number of seconds since epoch.voidsetTimestamp(String timestamp) Sets the timestamp.voidSets the request or access token.voidsetVerifier(String verifier) Sets the verifier code.voidSets the protocol version to the default value of 1.0.voidsetVersion(String version) Sets the protocol version.Builder pattern method to returnOAuth1Parametersafter setting signature.signatureMethod(String signatureMethod) Builder pattern method to returnOAuth1Parametersafter setting signature method.Builder pattern method to returnOAuth1Parametersafter setting timestamp to the current time.Builder pattern method to returnOAuth1Parametersafter setting timestamp.Builder pattern method to returnOAuth1Parametersafter setting token.Builder pattern method to returnOAuth1Parametersafter setting verifier code.version()Builder pattern method to returnOAuth1Parametersafter setting version to the default value of 1.0.Builder pattern method to returnOAuth1Parametersafter setting version.writeRequest(OAuth1Request request) Writes the OAuth parameters to a request, as an Authorization header.Methods inherited from class java.util.HashMapclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMapequals, hashCode, toString
- 
Field Details- 
AUTHORIZATION_HEADERName of HTTP authorization header.- See Also:
 
- 
SCHEMEOAuth scheme in Authorization header.- See Also:
 
- 
REALMName of parameter containing the protection realm.- See Also:
 
- 
CONSUMER_KEYName of parameter containing the consumer key.- See Also:
 
- 
TOKENName of parameter containing the access/request token.- See Also:
 
- 
SIGNATURE_METHODName of parameter containing the signature method.- See Also:
 
- 
SIGNATUREName of parameter containing the signature.- See Also:
 
- 
TIMESTAMPName of parameter containing the timestamp.- See Also:
 
- 
NONCEName of parameter containing the nonce.- See Also:
 
- 
VERSIONName of parameter containing the protocol version.- See Also:
 
- 
VERIFIERName of parameter containing the verifier code.- See Also:
 
- 
CALLBACKName of parameter containing the callback URL.- See Also:
 
- 
TOKEN_SECRETName of parameter containing the token secret. This parameter is never used in requests. It is part of a response to the request token and access token requests.- See Also:
 
- 
CALLBACK_CONFIRMEDName of parameter containing the token secret. This parameter is never used in requests. It is part of a response to the request token requests.- See Also:
 
- 
NO_CALLBACK_URI_VALUEDefault value of the callback URI that should be used during Authorization flow for Request Token request when the client is not capable of handling redirects (e.g. the client is a mobile application).- See Also:
 
 
- 
- 
Constructor Details- 
OAuth1Parameterspublic OAuth1Parameters()
 
- 
- 
Method Details- 
getRealmReturns the protection realm for the request.
- 
setRealmSets the protection realm for the request.
- 
realmBuilder pattern method to returnOAuth1Parametersafter setting protection realm.- Parameters:
- realm- the protection realm for the request.
- Returns:
- this parameters object.
 
- 
getConsumerKeyReturns the consumer key.
- 
setConsumerKeySets the consumer key.
- 
consumerKeyBuilder pattern method to returnOAuth1Parametersafter setting consumer key.- Parameters:
- consumerKey- the consumer key.
 
- 
getTokenReturns the request or access token.
- 
put
- 
setTokenSets the request or access token.
- 
tokenBuilder pattern method to returnOAuth1Parametersafter setting token.- Parameters:
- token- the access or request token.
- Returns:
- this parameters object.
 
- 
getSignatureMethodReturns the signature method used to sign the request.
- 
setSignatureMethodSets the signature method used to sign the request.
- 
signatureMethodBuilder pattern method to returnOAuth1Parametersafter setting signature method.- Parameters:
- signatureMethod- the signature method used to sign the request.
- Returns:
- this parameters object.
 
- 
getSignatureReturns the signature for the request.
- 
setSignatureSets the signature for the request.
- 
signatureBuilder pattern method to returnOAuth1Parametersafter setting signature.- Parameters:
- signature- the signature for the request.
- Returns:
- this parameters object.
 
- 
getTimestampReturns the timestamp, a value expected to be a positive integer, typically containing the number of seconds since January 1, 1970 00:00:00 GMT (epoch).
- 
setTimestampSets the timestamp. Its value is not validated, but should be a positive integer, typically containing the number of seconds since January 1, 1970 00:00:00 GMT (epoch).
- 
timestampBuilder pattern method to returnOAuth1Parametersafter setting timestamp.- Parameters:
- timestamp- positive integer, typically number of seconds since epoch.
- Returns:
- this parameters object.
 
- 
setTimestamppublic void setTimestamp()Sets the timestamp to the current time as number of seconds since epoch.
- 
timestampBuilder pattern method to returnOAuth1Parametersafter setting timestamp to the current time.- Returns:
- this parameters object.
 
- 
getNonceReturns the nonce, a value that should be unique for a given timestamp.
- 
setNonceSets the nonce, a value that should be unique for a given timestamp.
- 
nonceBuilder pattern method to returnOAuth1Parametersafter setting nonce.- Parameters:
- nonce- a value that should be unique for a given timestamp.
- Returns:
- this parameters object.
 
- 
setNoncepublic void setNonce()Sets the nonce to contain a randomly-generated UUID.
- 
nonceBuilder pattern method to returnOAuth1Parametersafter setting nonce to a randomly-generated UUID.- Returns:
- this parameters object.
 
- 
getVersionReturns the protocol version.
- 
setVersionSets the protocol version.
- 
versionBuilder pattern method to returnOAuth1Parametersafter setting version.- Parameters:
- version- the protocol version.
- Returns:
- this parameters object.
 
- 
setVersionpublic void setVersion()Sets the protocol version to the default value of 1.0.
- 
versionBuilder pattern method to returnOAuth1Parametersafter setting version to the default value of 1.0.- Returns:
- this parameters object.
 
- 
getVerifierReturns the verifier code.
- 
setVerifierSets the verifier code.
- 
verifierBuilder pattern method to returnOAuth1Parametersafter setting verifier code.- Parameters:
- verifier- the verifier code.
- Returns:
- this parameters object.
 
- 
getCallbackReturns the callback URL.
- 
setCallbackSets the callback URL.
- 
callbackBuilder pattern method to returnOAuth1Parametersafter setting callback URL.- Parameters:
- callback- the callback URL.
- Returns:
- this parameters object.
 
- 
readRequestReads a request for OAuth parameters, and populates this object.- Parameters:
- request- the request to read OAuth parameters from.
- Returns:
- this parameters object.
 
- 
writeRequestWrites the OAuth parameters to a request, as an Authorization header.- Parameters:
- request- the request to write OAuth parameters to.
- Returns:
- this parameters object.
 
- 
clone
 
-