Class BitbucketOAuthAuthenticatorSource

java.lang.Object
jenkins.authentication.tokens.api.AuthenticationTokenSource<BitbucketOAuthAuthenticator,com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials>
com.cloudbees.jenkins.plugins.bitbucket.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.
  • 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 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.
      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 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>