Class BitbucketOAuthAuthenticatorSource
java.lang.Object
jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
com.cloudbees.jenkins.plugins.bitbucket.api.credentials.BitbucketOAuthAuthenticatorSource
- All Implemented Interfaces:
ExtensionPoint
@Extension
public class BitbucketOAuthAuthenticatorSource
extends jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
Source for OAuth authenticators.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials standardUsernamePasswordCredentials) Converts username/password credentials to an authenticator.protected boolean
isFit
(jenkins.authentication.tokens.api.AuthenticationTokenContext<? super BitbucketOAuthAuthenticator> ctx) Whether this source works in the given context.com.cloudbees.plugins.credentials.CredentialsMatcher
matcher()
Methods inherited from class jenkins.authentication.tokens.api.AuthenticationTokenSource
consumes, consumes, fits, produces
-
Constructor Details
-
BitbucketOAuthAuthenticatorSource
public BitbucketOAuthAuthenticatorSource()Constructor.
-
-
Method Details
-
convert
@NonNull public BitbucketOAuthAuthenticator convert(@NonNull com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials standardUsernamePasswordCredentials) throws jenkins.authentication.tokens.api.AuthenticationTokenException Converts username/password credentials to an authenticator.- Specified by:
convert
in classjenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials> - Parameters:
standardUsernamePasswordCredentials
- the username/password combo- Returns:
- an authenticator that will use them.
- Throws:
jenkins.authentication.tokens.api.AuthenticationTokenException
- if the specific credentials could not be converted.
-
isFit
protected boolean isFit(jenkins.authentication.tokens.api.AuthenticationTokenContext<? super BitbucketOAuthAuthenticator> ctx) Whether this source works in the given context. For client certs, only HTTPS BitbucketServer instances make sense- Overrides:
isFit
in classjenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials> - Parameters:
ctx
- the context- Returns:
- whether this can authenticate given the context
-
matcher
public com.cloudbees.plugins.credentials.CredentialsMatcher matcher()- Overrides:
matcher
in classjenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
-