Class 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.
    • Constructor Detail

      • BitbucketOAuthAuthenticatorSource

        public BitbucketOAuthAuthenticatorSource()
        Constructor.
    • Method Detail

      • convert

        @NonNull
        public BitbucketOAuthAuthenticator convert​(@NonNull
                                                   com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials standardUsernamePasswordCredentials)
        Converts username/password credentials to an authenticator.
        Specified by:
        convert in class jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,​com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
        Parameters:
        standardUsernamePasswordCredentials - the username/password combo
        Returns:
        an authenticator that will use them.
      • isFit

        public boolean isFit​(jenkins.authentication.tokens.api.AuthenticationTokenContext ctx)
        Whether this source works in the given context. For client certs, only HTTPS BitbucketServer instances make sense
        Overrides:
        isFit in class jenkins.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 class jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,​com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>