Class BitbucketAccessTokenAuthenticatorSource
java.lang.Object
jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketAccessTokenAuthenticator,org.jenkinsci.plugins.plaincredentials.StringCredentials>
com.cloudbees.jenkins.plugins.bitbucket.api.credentials.BitbucketAccessTokenAuthenticatorSource
- All Implemented Interfaces:
ExtensionPoint
@Extension
public class BitbucketAccessTokenAuthenticatorSource
extends jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketAccessTokenAuthenticator,org.jenkinsci.plugins.plaincredentials.StringCredentials>
Source for access token authenticators.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(org.jenkinsci.plugins.plaincredentials.StringCredentials credentials) Converts string credentials to an authenticator.protected boolean
isFit
(jenkins.authentication.tokens.api.AuthenticationTokenContext<? super BitbucketAccessTokenAuthenticator> ctx) Whether this source works in the given context.Methods inherited from class jenkins.authentication.tokens.api.AuthenticationTokenSource
consumes, consumes, fits, matcher, produces
-
Constructor Details
-
BitbucketAccessTokenAuthenticatorSource
public BitbucketAccessTokenAuthenticatorSource()Constructor.
-
-
Method Details
-
convert
@NonNull public BitbucketAccessTokenAuthenticator convert(@NonNull org.jenkinsci.plugins.plaincredentials.StringCredentials credentials) Converts string credentials to an authenticator.- Specified by:
convert
in classjenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketAccessTokenAuthenticator,
org.jenkinsci.plugins.plaincredentials.StringCredentials> - Parameters:
credentials
- the access token- Returns:
- an authenticator that will use the access token
-
isFit
protected boolean isFit(jenkins.authentication.tokens.api.AuthenticationTokenContext<? super BitbucketAccessTokenAuthenticator> ctx) Whether this source works in the given context.- Overrides:
isFit
in classjenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketAccessTokenAuthenticator,
org.jenkinsci.plugins.plaincredentials.StringCredentials> - Parameters:
ctx
- the context- Returns:
- whether this can authenticate given the context
-