Class BitbucketOAuthAuthenticator

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

public class BitbucketOAuthAuthenticator extends Object implements BitbucketAuthenticator
  • Constructor Details

    • BitbucketOAuthAuthenticator

      public BitbucketOAuthAuthenticator(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials)
      Constructor.
      Parameters:
      credentials - the key/pass that will be used
  • Method Details

    • configureRequest

      public void configureRequest(org.apache.http.HttpRequest request)
      Set up request with token in header
      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.