java.lang.Object
com.atlassian.bitbucket.jenkins.internal.applink.oauth.serviceprovider.consumer.Consumer.Builder
Enclosing class:
Consumer

public static final class Consumer.Builder extends Object
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 Details

    • Builder

      public Builder(String key)
  • Method Details

    • name

      public Consumer.Builder name(String name)
      Sets the name attribute of the Consumer object under construction and returns this builder to allow other attributes to be set
      Parameters:
      name - value to be used as the name attribute of the Consumer being constructed
      Returns:
      this builder
    • signatureMethod

      public Consumer.Builder signatureMethod(Consumer.SignatureMethod signatureMethod)
      Sets the signatureMethod attribute of the Consumer object under construction and returns this builder to allow other attributes to be set
      Parameters:
      signatureMethod - SignatureMethod to be used when signing requests as this consumer
      Returns:
      this builder
    • publicKey

      public Consumer.Builder publicKey(PublicKey publicKey)
      Sets the publicKey attribute of the Consumer object under construction and returns this builder to allow other attributes to be set
      Parameters:
      publicKey - RSA PublicKey to be used as the publicKey attribute of the Consumer being constructed
      Returns:
      this builder
    • description

      public Consumer.Builder description(String description)
      Sets the description of the consumer as it would be displayed to the user and returns this builder to allow other attributes to be set
      Parameters:
      description - the description of the consumer as it would be displayed to the user
      Returns:
      this builder
    • callback

      public Consumer.Builder callback(URI callback)
      Sets the default callback URL used after a request token has been authorized and returns this builder to allow other attributes to be set
      Parameters:
      callback - the default callback URI used after a request token has been authorized
      Returns:
      this builder
    • consumerSecret

      public Consumer.Builder consumerSecret(String secret)
      Sets the consumer secret which is used in HMAC_SHA1 signature method and possibly other symmetric crypto methods.
      Parameters:
      secret - the secret
      Returns:
      this builder
    • build

      public Consumer build()
      Constructs and returns the finalConsumer instance.
      Returns:
      the final Consumer instance