Class BitbucketUserAPITokenAuthenticator

java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.credentials.BitbucketUserAPITokenAuthenticator
All Implemented Interfaces:
BitbucketAuthenticator

public class BitbucketUserAPITokenAuthenticator extends Object implements BitbucketAuthenticator
Authenticator that uses a username and password (probably the default)
  • Constructor Details

    • BitbucketUserAPITokenAuthenticator

      public BitbucketUserAPITokenAuthenticator(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials)
      Constructor.
      Parameters:
      credentials - the username/password that will be used
  • Method Details

    • configureRequest

      public void configureRequest(org.apache.hc.core5.http.HttpRequest request)
      Description copied from interface: BitbucketAuthenticator
      Configures an HttpRequest. Override this if your authentication method needs to set headers on a per-request basis.
      Specified by:
      configureRequest in interface BitbucketAuthenticator
      Parameters:
      request - the request.
    • getCredentialsForSCM

      public com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentialsForSCM()
      Description copied from interface: BitbucketAuthenticator
      Provides credentials that can be used for authenticated interactions with SCM.
      Specified by:
      getCredentialsForSCM in interface BitbucketAuthenticator
      Returns:
      credentials to be passed to GitClient.setCredentials(StandardUsernameCredentials). If null force GitSCM to obtain credentials in the standard way, from the credential provider, using the credential identifier provided by BitbucketAuthenticator.getId().
    • getId

      public String getId()
      Specified by:
      getId in interface BitbucketAuthenticator
      Returns:
      id of the credentials used.