Class CertificateCredentialsConvertor
- java.lang.Object
-
- com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
-
- com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.convertors.CertificateCredentialsConvertor
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class CertificateCredentialsConvertor extends SecretToCredentialConverter
SecretToCredentialConvertor that convertsCertificateCredentialsImpl
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description CertificateCredentialsConvertor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(String type)
Check if this converter can transform secrets of a given type.com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl
convert(io.fabric8.kubernetes.api.model.Secret secret)
Convert the givenSecret
to anIdCredential
.-
Methods inherited from class com.cloudbees.jenkins.plugins.kubernetes_credentials_provider.SecretToCredentialConverter
all
-
-
-
-
Method Detail
-
canConvert
public boolean canConvert(String type)
Description copied from class:SecretToCredentialConverter
Check if this converter can transform secrets of a given type.- Specified by:
canConvert
in classSecretToCredentialConverter
- Parameters:
type
- the type of secret. This is normally the symbol attached to the credential type by the credential binding plugin.- Returns:
true
iff thisSecretToCredentialConvertor
can convert secrets of the specified type.
-
convert
public com.cloudbees.plugins.credentials.impl.CertificateCredentialsImpl convert(io.fabric8.kubernetes.api.model.Secret secret) throws CredentialsConvertionException
Description copied from class:SecretToCredentialConverter
Convert the givenSecret
to anIdCredential
. This will only be called for a secret of a type that the class has previously returnedtrue
fromSecretToCredentialConverter.canConvert(String)
.- Specified by:
convert
in classSecretToCredentialConverter
- Parameters:
secret
- the Secret to convert.- Returns:
- the IdCredentials created from the secret.
- Throws:
CredentialsConvertionException
- if the Secret could not be converted.
-
-