Class Consumer.Builder
java.lang.Object
com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.consumer.Consumer.Builder
- Enclosing class:
- Consumer
Builder allowing the optional attributes of the
Consumer object under construction to be set and
construction of the final Consumer instance.
We only support 3 legged authentication at the moment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs and returns the finalConsumerinstance.Sets the default callback URL used after a request token has been authorized and returnsthisbuilder to allow other attributes to be setconsumerSecret(String secret) Sets the consumer secret which is used in HMAC_SHA1 signature method and possibly other symmetric crypto methods.description(String description) Sets the description of the consumer as it would be displayed to the user and returnsthisbuilder to allow other attributes to be setSets thenameattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be setSets thepublicKeyattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be setsignatureMethod(Consumer.SignatureMethod signatureMethod) Sets thesignatureMethodattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be set
-
Constructor Details
-
Builder
-
-
Method Details
-
name
Sets thenameattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be set- Parameters:
name- value to be used as thenameattribute of theConsumerbeing constructed- Returns:
thisbuilder
-
signatureMethod
Sets thesignatureMethodattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be set- Parameters:
signatureMethod-SignatureMethodto be used when signing requests as this consumer- Returns:
thisbuilder
-
publicKey
Sets thepublicKeyattribute of theConsumerobject under construction and returnsthisbuilder to allow other attributes to be set- Parameters:
publicKey- RSAPublicKeyto be used as thepublicKeyattribute of theConsumerbeing constructed- Returns:
thisbuilder
-
description
Sets the description of the consumer as it would be displayed to the user and returnsthisbuilder to allow other attributes to be set- Parameters:
description- the description of the consumer as it would be displayed to the user- Returns:
thisbuilder
-
callback
Sets the default callback URL used after a request token has been authorized and returnsthisbuilder to allow other attributes to be set- Parameters:
callback- the default callback URI used after a request token has been authorized- Returns:
thisbuilder
-
consumerSecret
Sets the consumer secret which is used in HMAC_SHA1 signature method and possibly other symmetric crypto methods.- Parameters:
secret- the secret- Returns:
thisbuilder
-
build
Constructs and returns the finalConsumerinstance.- Returns:
- the final
Consumerinstance
-