Class BitbucketCredentialConverter

  • All Implemented Interfaces:
    ExtensionPoint

    @Extension
    public class BitbucketCredentialConverter
    extends com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
    SecretToCredentialConverter that converts BitbucketTokenCredentialsImpl.
    • Constructor Detail

      • BitbucketCredentialConverter

        public BitbucketCredentialConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(String type)
        Specified by:
        canConvert in class com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
      • convert

        public com.atlassian.bitbucket.jenkins.internal.config.BitbucketTokenCredentialsImpl convert​(io.fabric8.kubernetes.api.model.Secret secret)
                                                                                              throws com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.CredentialsConvertionException
        Specified by:
        convert in class com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
        Throws:
        com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.CredentialsConvertionException
      • base64DecodeToString

        @CheckForNull
        public static String base64DecodeToString​(String s)
        Convert a String representation of the base64 encoded bytes of a UTF-8 String back to a String.
        Parameters:
        s - the base64 encoded String representation of the bytes.
        Returns:
        the String or null if the string could not be converted.