Class BitbucketAccessTokenAuthenticator

java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
com.cloudbees.jenkins.plugins.bitbucket.api.credentials.BitbucketAccessTokenAuthenticator

public class BitbucketAccessTokenAuthenticator extends BitbucketAuthenticator
Authenticator that uses an access token.
  • Constructor Details

    • BitbucketAccessTokenAuthenticator

      public BitbucketAccessTokenAuthenticator(org.jenkinsci.plugins.plaincredentials.StringCredentials credentials)
      Constructor.
      Parameters:
      credentials - the access token that will be used
  • Method Details

    • configureRequest

      public void configureRequest(org.apache.http.HttpRequest request)
      Provides the access token as header.
      Overrides:
      configureRequest in class BitbucketAuthenticator
      Parameters:
      request - the request
    • getCredentialsForScm

      public com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentialsForScm()
      Description copied from class: BitbucketAuthenticator
      Provides credentials that can be used for authenticated interactions with SCM.
      Overrides:
      getCredentialsForScm in class BitbucketAuthenticator
      Returns:
      credentials to be passed to GitClient.setCredentials(StandardUsernameCredentials)