@Extension public class UsernamePasswordCredentialsConvertor extends SecretToCredentialConverter
UsernamePasswordCredentialsImpl.ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
UsernamePasswordCredentialsConvertor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(String type)
Check if this converter can transform secrets of a given type.
|
com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl |
convert(io.fabric8.kubernetes.api.model.Secret secret)
Convert the given
Secret to an IdCredential. |
allpublic UsernamePasswordCredentialsConvertor()
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.plugins.credentials.impl.UsernamePasswordCredentialsImpl 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–2021. All rights reserved.