public class BasicSSHUserPrivateKey extends BaseSSHUser implements SSHUserPrivateKey
Modifier and Type | Class and Description |
---|---|
static class |
BasicSSHUserPrivateKey.DescriptorImpl |
static class |
BasicSSHUserPrivateKey.DirectEntryPrivateKeySource
Let the user enter the key directly via copy & paste
|
static class |
BasicSSHUserPrivateKey.FileOnMasterPrivateKeySource
Deprecated.
This approach has security vulnerability and should be migrated to
BasicSSHUserPrivateKey.DirectEntryPrivateKeySource |
static class |
BasicSSHUserPrivateKey.PrivateKeySource
A source of private keys
|
static class |
BasicSSHUserPrivateKey.PrivateKeySourceDescriptor
Descriptor for a
BasicSSHUserPrivateKey.PrivateKeySource |
static class |
BasicSSHUserPrivateKey.UsersPrivateKeySource
Deprecated.
This approach has security vulnerability and should be migrated to
BasicSSHUserPrivateKey.DirectEntryPrivateKeySource |
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.NameProvider
username
Constructor and Description |
---|
BasicSSHUserPrivateKey(com.cloudbees.plugins.credentials.CredentialsScope scope,
String id,
String username,
BasicSSHUserPrivateKey.PrivateKeySource privateKeySource,
String passphrase,
String description)
Constructor for stapler.
|
Modifier and Type | Method and Description |
---|---|
hudson.util.Secret |
getPassphrase()
Gets the passphrase for the private keys or
null if the private keys are not protected by a
passphase. |
String |
getPrivateKey()
Returns the first private key.
|
List<String> |
getPrivateKeys()
Returns a collection of keys to try in order for authentication.
|
BasicSSHUserPrivateKey.PrivateKeySource |
getPrivateKeySource() |
getUsername
equals, getDescription, getId, hashCode
getDescriptor, getScope
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDescription
@DataBoundConstructor public BasicSSHUserPrivateKey(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String username, BasicSSHUserPrivateKey.PrivateKeySource privateKeySource, String passphrase, String description)
scope
- the credentials scopeusername
- the username.privateKeySource
- the private key.passphrase
- the password.description
- the description.@NonNull public String getPrivateKey()
getPrivateKey
in interface SSHUserPrivateKey
@NonNull public List<String> getPrivateKeys()
SSHUserPrivateKey
getPrivateKeys
in interface SSHUserPrivateKey
SSHAuthenticator.getPrivateKeys(com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey)
@NonNull public BasicSSHUserPrivateKey.PrivateKeySource getPrivateKeySource()
@CheckForNull public hudson.util.Secret getPassphrase()
null
if the private keys are not protected by a
passphase.getPassphrase
in interface SSHUserPrivateKey
null
if the private key are not protected by
a passphase.Copyright © 2016–2020. All rights reserved.