@OptionalExtension(requirePlugins="ssh-credentials") public class BasicSSHUserPrivateKeyCredentialsConvertor extends SecretToCredentialConverter
BasicSSHUserPrivateKey.ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
BasicSSHUserPrivateKeyCredentialsConvertor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(String type)
Check if this converter can transform secrets of a given type.
|
com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey |
convert(io.fabric8.kubernetes.api.model.Secret secret)
Convert the given
Secret to an IdCredential. |
allpublic BasicSSHUserPrivateKeyCredentialsConvertor()
public boolean canConvert(String type)
SecretToCredentialConvertercanConvert in class SecretToCredentialConvertertype - the type of secret. This is normally the symbol attached to the credential type by the credential binding plugin.true iff this SecretToCredentialConvertor can convert secrets of the specified type.public com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey convert(io.fabric8.kubernetes.api.model.Secret secret)
throws CredentialsConvertionException
SecretToCredentialConverterSecret to an IdCredential.
This will only be called for a secret of a type that the class has previously returned true from SecretToCredentialConverter.canConvert(String).convert in class SecretToCredentialConvertersecret - the Secret to convert.CredentialsConvertionException - if the Secret could not be converted.Copyright © 2018–2019. All rights reserved.