Class BitbucketUserAPITokenAuthenticator
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.impl.credentials.BitbucketUserAPITokenAuthenticator
- All Implemented Interfaces:
BitbucketAuthenticator
Authenticator that uses a username and password (probably the default)
-
Field Summary
Fields inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
BITBUCKET_INSTANCE_TYPE, BITBUCKET_INSTANCE_TYPE_CLOUD, BITBUCKET_INSTANCE_TYPE_SERVER, SCHEME, SERVER_URL -
Constructor Summary
ConstructorsConstructorDescriptionBitbucketUserAPITokenAuthenticator(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureRequest(org.apache.hc.core5.http.HttpRequest request) Configures anHttpRequest.com.cloudbees.plugins.credentials.common.StandardUsernameCredentialsProvides credentials that can be used for authenticated interactions with SCM.getId()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
configureBuilder, configureContext
-
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:BitbucketAuthenticatorConfigures anHttpRequest. Override this if your authentication method needs to set headers on a per-request basis.- Specified by:
configureRequestin interfaceBitbucketAuthenticator- Parameters:
request- the request.
-
getCredentialsForSCM
public com.cloudbees.plugins.credentials.common.StandardUsernameCredentials getCredentialsForSCM()Description copied from interface:BitbucketAuthenticatorProvides credentials that can be used for authenticated interactions with SCM.- Specified by:
getCredentialsForSCMin interfaceBitbucketAuthenticator- Returns:
- credentials to be passed to
GitClient.setCredentials(StandardUsernameCredentials). IfnullforceGitSCMto obtain credentials in the standard way, from the credential provider, using the credential identifier provided byBitbucketAuthenticator.getId().
-
getId
- Specified by:
getIdin interfaceBitbucketAuthenticator- Returns:
- id of the credentials used.
-