Class SecretToCredentialConverter

    • Constructor Detail

      • SecretToCredentialConverter

        public SecretToCredentialConverter()
    • Method Detail

      • canConvert

        public abstract boolean canConvert​(String type)
        Check if this converter can transform secrets of a given type.
        Parameters:
        type - the type of secret. This is normally the symbol attached to the credential type by the credential binding plugin.
        Returns:
        true iff this SecretToCredentialConvertor can convert secrets of the specified type.
      • convert

        public abstract com.cloudbees.plugins.credentials.common.IdCredentials convert​(io.fabric8.kubernetes.api.model.Secret secret)
                                                                                throws CredentialsConvertionException
        Convert the given Secret to an IdCredential. This will only be called for a secret of a type that the class has previously returned true from canConvert(String).
        Parameters:
        secret - the Secret to convert.
        Returns:
        the IdCredentials created from the secret.
        Throws:
        CredentialsConvertionException - if the Secret could not be converted.
      • all

        public static final ExtensionList<SecretToCredentialConverter> all()
        Helper to obtain all the implementations of this ExtensionPoint
        Returns:
        the ExtensionList containing all of the implementations.