com.cloudbees.jenkins.plugins.sshcredentials.impl
Class BasicSSHUserPrivateKey
java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
- All Implemented Interfaces:
- SSHUser, SSHUserPrivateKey, com.cloudbees.plugins.credentials.Credentials, hudson.model.Describable<com.cloudbees.plugins.credentials.Credentials>, java.io.Serializable
public class BasicSSHUserPrivateKey
- extends BaseSSHUser
- implements SSHUserPrivateKey
A simple username / password for use with SSH connections.
- See Also:
- Serialized Form
| Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials |
getDescriptor, getScope |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.cloudbees.plugins.credentials.Credentials |
getDescriptor, getScope |
BasicSSHUserPrivateKey
@DataBoundConstructor
public BasicSSHUserPrivateKey(com.cloudbees.plugins.credentials.CredentialsScope scope,
java.lang.String id,
java.lang.String username,
BasicSSHUserPrivateKey.PrivateKeySource privateKeySource,
java.lang.String passphrase,
java.lang.String description)
- Constructor for stapler.
- Parameters:
scope - the credentials scopeusername - the username.privateKeySource - the private key.passphrase - the password.description - the description.
getPrivateKey
@NonNull
public java.lang.String getPrivateKey()
- Returns the private key. This should be in OpenSSH format.
- Specified by:
getPrivateKey in interface SSHUserPrivateKey
- Returns:
- the private key in OpenSSH format.
getPrivateKeySource
@NonNull
public BasicSSHUserPrivateKey.PrivateKeySource getPrivateKeySource()
getPassphrase
@NonNull
public hudson.util.Secret getPassphrase()
- Gets the passphrase for the private key or
null if the private key is not protected by a passphase.
- Specified by:
getPassphrase in interface SSHUserPrivateKey
- Returns:
- the passphrase for the private key or
null if the private key is not protected by a passphase.
Copyright © 2004-2013. All Rights Reserved.