Class BitbucketOAuthAuthenticator
java.lang.Object
com.cloudbees.jenkins.plugins.bitbucket.credentials.BitbucketOAuthAuthenticator
- All Implemented Interfaces:
BitbucketAuthenticator
-
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
ConstructorDescriptionBitbucketOAuthAuthenticator
(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureRequest
(org.apache.http.HttpRequest request) Set up request with token in headercom.cloudbees.plugins.credentials.common.StandardUsernameCredentials
Provides 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, wait
Methods inherited from interface com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketAuthenticator
configureBuilder, configureContext
-
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 interfaceBitbucketAuthenticator
- 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 interfaceBitbucketAuthenticator
- Returns:
- credentials to be passed to
GitClient.setCredentials(StandardUsernameCredentials)
. Ifnull
forceGitSCM
to obtain credentials in the standard way, from the credential provider, using the credential identifier provided byBitbucketAuthenticator.getId()
.
-
getId
- Specified by:
getId
in interfaceBitbucketAuthenticator
- Returns:
- id of the credentials used.
-