Package com.linecorp.armeria.common.auth
Class OAuth1aTokenBuilder
java.lang.Object
com.linecorp.armeria.common.auth.OAuth1aTokenBuilder
public final class OAuth1aTokenBuilder extends Object
Builds a new
OAuth1aToken
.-
Method Summary
Modifier and Type Method Description OAuth1aToken
build()
Returns a newly-createdOAuth1aToken
based on the properties set so far.OAuth1aTokenBuilder
consumerKey(String consumerKey)
Sets the value of the oath_consumer_key property.OAuth1aTokenBuilder
nonce(String nonce)
Sets the value of oauth_nonce property.OAuth1aTokenBuilder
put(String key, String value)
Sets the specifiedkey
-value
parameter.OAuth1aTokenBuilder
putAll(Map<String,String> params)
Sets the specifiedMap
.OAuth1aTokenBuilder
realm(String realm)
Sets the value of the realm property.OAuth1aTokenBuilder
signature(String signature)
Sets the value of oauth_signature property.OAuth1aTokenBuilder
signatureMethod(String signatureMethod)
Sets the value of oauth_signature_method property.OAuth1aTokenBuilder
timestamp(String timestamp)
Sets the value of oauth_timestamp property.OAuth1aTokenBuilder
token(String token)
Sets the value of the oauth_token property.OAuth1aTokenBuilder
version(String version)
Sets the value of oauth_version property.
-
Method Details
-
realm
Sets the value of the realm property. -
consumerKey
Sets the value of the oath_consumer_key property. -
token
Sets the value of the oauth_token property. -
signatureMethod
Sets the value of oauth_signature_method property. -
signature
Sets the value of oauth_signature property. -
timestamp
Sets the value of oauth_timestamp property. -
nonce
Sets the value of oauth_nonce property. -
version
Sets the value of oauth_version property. If not set, "1.0" is used by default. -
put
Sets the specifiedkey
-value
parameter. If thekey
is not one of the pre-defined parameters, then thekey
-value
pair is set as an additional parameter. If thekey
is one of the pre-defined parameters, then the corresponding property is automatically set.OAuth1aToken.builder().put("oauth_signature_method", "foo"); // is equivalent to OAuth1aToken.builder().signatureMethod("foo"); // This is just an additional parameter. OAuth1aToken.builder().put("just_an_additional_parameter", "bar");
-
putAll
Sets the specifiedMap
. If the key in theMap
is not one of the pre-defined parameters, then the key-value pair is set as an additional parameter. If the key is one of the pre-defined parameters, then the corresponding property is automatically set.OAuth1aToken.builder().putAll(Map.of("oauth_signature_method", "foo" "oauth_signature", "bar")); // is equivalent to OAuth1aToken.builder().signatureMethod("foo") .signature("bar");
-
build
Returns a newly-createdOAuth1aToken
based on the properties set so far.
-