Class BitbucketAccessTokenAuthenticator
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
com.cloudbees.jenkins.plugins.bitbucket.api.credentials.BitbucketAccessTokenAuthenticator
Authenticator that uses an access token.
-
Field Summary
Fields inherited from class com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
BITBUCKET_INSTANCE_TYPE, BITBUCKET_INSTANCE_TYPE_CLOUD, BITBUCKET_INSTANCE_TYPE_SERVER, SCHEME, SERVER_URL
-
Constructor Summary
ConstructorDescriptionBitbucketAccessTokenAuthenticator
(org.jenkinsci.plugins.plaincredentials.StringCredentials credentials) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureRequest
(org.apache.http.HttpRequest request) Provides the access token as header.com.cloudbees.plugins.credentials.common.StandardUsernameCredentials
Provides credentials that can be used for authenticated interactions with SCM.Methods inherited from class com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
authenticationContext, configureBuilder, configureContext, getId
-
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 classBitbucketAuthenticator
- 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 classBitbucketAuthenticator
- Returns:
- credentials to be passed to
GitClient.setCredentials(StandardUsernameCredentials)
-