Package com.linecorp.armeria.common.auth
Class OAuth1aTokenBuilder
java.lang.Object
com.linecorp.armeria.common.auth.OAuth1aTokenBuilder
Builds a new
OAuth1aToken
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly-createdOAuth1aToken
based on the properties set so far.consumerKey
(String consumerKey) Sets the value of the oath_consumer_key property.Sets the value of oauth_nonce property.Sets the specifiedkey
-value
parameter.Sets the specifiedMap
.Sets the value of the realm property.Sets the value of oauth_signature property.signatureMethod
(String signatureMethod) Sets the value of oauth_signature_method property.Sets the value of oauth_timestamp property.Sets the value of the oauth_token property.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.
-