com.cloudbees.jenkins.plugins.sshcredentials.impl
Class BasicSSHUserPrivateKey

java.lang.Object
  extended by com.cloudbees.plugins.credentials.BaseCredentials
      extended by com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
          extended by 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

Nested Class Summary
static class BasicSSHUserPrivateKey.DescriptorImpl
          
static class BasicSSHUserPrivateKey.DirectEntryPrivateKeySource
          Let the user enter the key directly via copy & paste
static class BasicSSHUserPrivateKey.FileOnMasterPrivateKeySource
          Let the user reference a file on the disk.
static class BasicSSHUserPrivateKey.PrivateKeySource
          A source of private keys
static class BasicSSHUserPrivateKey.PrivateKeySourceDescriptor
          Descriptor for a BasicSSHUserPrivateKey.PrivateKeySource
static class BasicSSHUserPrivateKey.ReadFileOnMaster
           
static class BasicSSHUserPrivateKey.ReadKeyOnMaster
           
static class BasicSSHUserPrivateKey.UsersPrivateKeySource
          Let the user
 
Field Summary
 
Fields inherited from class com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
description, id, username
 
Constructor Summary
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.
 
Method Summary
 hudson.util.Secret getPassphrase()
          Gets the passphrase for the private key or null if the private key is not protected by a passphase.
 java.lang.String getPrivateKey()
          Returns the private key.
 BasicSSHUserPrivateKey.PrivateKeySource getPrivateKeySource()
           
 
Methods inherited from class com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
getDescription, getId, getUsername
 
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.jenkins.plugins.sshcredentials.SSHUser
getDescription, getId, getUsername
 
Methods inherited from interface com.cloudbees.plugins.credentials.Credentials
getDescriptor, getScope
 

Constructor Detail

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 scope
username - the username.
privateKeySource - the private key.
passphrase - the password.
description - the description.
Method Detail

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.