public class OAuth1Parameters extends HashMap<String,String>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
AUTHORIZATION_HEADER
Name of HTTP authorization header.
|
static String |
CALLBACK
Name of parameter containing the callback URL.
|
static String |
CALLBACK_CONFIRMED
Name of parameter containing the token secret.
|
static String |
CONSUMER_KEY
Name of parameter containing the consumer key.
|
static String |
NO_CALLBACK_URI_VALUE
Default 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.
|
static String |
NONCE
Name of parameter containing the nonce.
|
static String |
REALM
Name of parameter containing the protection realm.
|
static String |
SCHEME
OAuth scheme in Authorization header.
|
static String |
SIGNATURE
Name of parameter containing the signature.
|
static String |
SIGNATURE_METHOD
Name of parameter containing the signature method.
|
static String |
TIMESTAMP
Name of parameter containing the timestamp.
|
static String |
TOKEN
Name of parameter containing the access/request token.
|
static String |
TOKEN_SECRET
Name of parameter containing the token secret.
|
static String |
VERIFIER
Name of parameter containing the verifier code.
|
static String |
VERSION
Name of parameter containing the protocol version.
|
Constructor and Description |
---|
OAuth1Parameters() |
Modifier and Type | Method and Description |
---|---|
OAuth1Parameters |
callback(String callback)
Builder pattern method to return
OAuth1Parameters after setting
callback URL. |
OAuth1Parameters |
clone() |
OAuth1Parameters |
consumerKey(String consumerKey)
Builder pattern method to return
OAuth1Parameters after setting
consumer key. |
String |
getCallback()
Returns the callback URL.
|
String |
getConsumerKey()
Returns the consumer key.
|
String |
getNonce()
Returns the nonce, a value that should be unique for a given
timestamp.
|
String |
getRealm()
Returns the protection realm for the request.
|
String |
getSignature()
Returns the signature for the request.
|
String |
getSignatureMethod()
Returns the signature method used to sign the request.
|
String |
getTimestamp()
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).
|
String |
getToken()
Returns the request or access token.
|
String |
getVerifier()
Returns the verifier code.
|
String |
getVersion()
Returns the protocol version.
|
OAuth1Parameters |
nonce()
Builder pattern method to return
OAuth1Parameters after setting
nonce to a randomly-generated UUID. |
OAuth1Parameters |
nonce(String nonce)
Builder pattern method to return
OAuth1Parameters after setting
nonce. |
String |
put(String key,
String value) |
OAuth1Parameters |
readRequest(OAuth1Request request)
Reads a request for OAuth parameters, and populates this object.
|
OAuth1Parameters |
realm(String realm)
Builder pattern method to return
OAuth1Parameters after setting
protection realm. |
void |
setCallback(String callback)
Sets the callback URL.
|
void |
setConsumerKey(String consumerKey)
Sets the consumer key.
|
void |
setNonce()
Sets the nonce to contain a randomly-generated UUID.
|
void |
setNonce(String nonce)
Sets the nonce, a value that should be unique for a given timestamp.
|
void |
setRealm(String realm)
Sets the protection realm for the request.
|
void |
setSignature(String signature)
Sets the signature for the request.
|
void |
setSignatureMethod(String signatureMethod)
Sets the signature method used to sign the request.
|
void |
setTimestamp()
Sets the timestamp to the current time as number of seconds since epoch.
|
void |
setTimestamp(String timestamp)
Sets the timestamp.
|
void |
setToken(String token)
Sets the request or access token.
|
void |
setVerifier(String verifier)
Sets the verifier code.
|
void |
setVersion()
Sets the protocol version to the default value of 1.0.
|
void |
setVersion(String version)
Sets the protocol version.
|
OAuth1Parameters |
signature(String signature)
Builder pattern method to return
OAuth1Parameters after setting
signature. |
OAuth1Parameters |
signatureMethod(String signatureMethod)
Builder pattern method to return
OAuth1Parameters after setting
signature method. |
OAuth1Parameters |
timestamp()
Builder pattern method to return
OAuth1Parameters after setting
timestamp to the current time. |
OAuth1Parameters |
timestamp(String timestamp)
Builder pattern method to return
OAuth1Parameters after setting
timestamp. |
OAuth1Parameters |
token(String token)
Builder pattern method to return
OAuth1Parameters after setting
token. |
OAuth1Parameters |
verifier(String verifier)
Builder pattern method to return
OAuth1Parameters after setting
verifier code. |
OAuth1Parameters |
version()
Builder pattern method to return
OAuth1Parameters after setting
version to the default value of 1.0. |
OAuth1Parameters |
version(String version)
Builder pattern method to return
OAuth1Parameters after setting
version. |
OAuth1Parameters |
writeRequest(OAuth1Request request)
Writes the OAuth parameters to a request, as an Authorization header.
|
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
public static final String AUTHORIZATION_HEADER
public static final String SCHEME
public static final String REALM
public static final String CONSUMER_KEY
public static final String TOKEN
public static final String SIGNATURE_METHOD
public static final String SIGNATURE
public static final String TIMESTAMP
public static final String NONCE
public static final String VERSION
public static final String VERIFIER
public static final String CALLBACK
public static final String TOKEN_SECRET
public static final String CALLBACK_CONFIRMED
public static final String NO_CALLBACK_URI_VALUE
public String getRealm()
public void setRealm(String realm)
public OAuth1Parameters realm(String realm)
OAuth1Parameters
after setting
protection realm.realm
- the protection realm for the request.public String getConsumerKey()
public void setConsumerKey(String consumerKey)
public OAuth1Parameters consumerKey(String consumerKey)
OAuth1Parameters
after setting
consumer key.consumerKey
- the consumer key.public String getToken()
public void setToken(String token)
public OAuth1Parameters token(String token)
OAuth1Parameters
after setting
token.token
- the access or request token.public String getSignatureMethod()
public void setSignatureMethod(String signatureMethod)
public OAuth1Parameters signatureMethod(String signatureMethod)
OAuth1Parameters
after setting
signature method.signatureMethod
- the signature method used to sign the request.public String getSignature()
public void setSignature(String signature)
public OAuth1Parameters signature(String signature)
OAuth1Parameters
after setting
signature.signature
- the signature for the request.public String getTimestamp()
public void setTimestamp(String timestamp)
public OAuth1Parameters timestamp(String timestamp)
OAuth1Parameters
after setting
timestamp.timestamp
- positive integer, typically number of seconds since epoch.public void setTimestamp()
public OAuth1Parameters timestamp()
OAuth1Parameters
after setting
timestamp to the current time.public String getNonce()
public void setNonce(String nonce)
public OAuth1Parameters nonce(String nonce)
OAuth1Parameters
after setting
nonce.nonce
- a value that should be unique for a given timestamp.public void setNonce()
public OAuth1Parameters nonce()
OAuth1Parameters
after setting
nonce to a randomly-generated UUID.public String getVersion()
public void setVersion(String version)
public OAuth1Parameters version(String version)
OAuth1Parameters
after setting
version.version
- the protocol version.public void setVersion()
public OAuth1Parameters version()
OAuth1Parameters
after setting
version to the default value of 1.0.public String getVerifier()
public void setVerifier(String verifier)
public OAuth1Parameters verifier(String verifier)
OAuth1Parameters
after setting
verifier code.verifier
- the verifier code.public String getCallback()
public void setCallback(String callback)
public OAuth1Parameters callback(String callback)
OAuth1Parameters
after setting
callback URL.callback
- the callback URL.public OAuth1Parameters readRequest(OAuth1Request request)
request
- the request to read OAuth parameters from.public OAuth1Parameters writeRequest(OAuth1Request request)
request
- the request to write OAuth parameters to.public OAuth1Parameters clone()
Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.