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

java.lang.Object
  extended by com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator<JSchConnector,SSHUserPassword>
      extended by com.cloudbees.jenkins.plugins.sshcredentials.impl.JSchSSHPasswordAuthenticator

public class JSchSSHPasswordAuthenticator
extends SSHAuthenticator<JSchConnector,SSHUserPassword>

Since:
25/10/2012 13:57
Author:
stephenc

Nested Class Summary
static class JSchSSHPasswordAuthenticator.Factory
          
 
Nested classes/interfaces inherited from class com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator
SSHAuthenticator.Mode
 
Constructor Summary
protected JSchSSHPasswordAuthenticator(JSchConnector connection, SSHUserPassword user)
           
 
Method Summary
 boolean canAuthenticate()
          Returns true if the bound connection is in a state where authentication can be tried using the supplied credentials.
protected  boolean doAuthenticate()
          SPI for authenticating the bound connection using the supplied credentials.
 SSHAuthenticator.Mode getAuthenticationMode()
          Returns the mode of authentication that this SSHAuthenticator supports.
 
Methods inherited from class com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator
authenticate, filter, getConnection, getUser, isAuthenticated, isSupported, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSchSSHPasswordAuthenticator

protected JSchSSHPasswordAuthenticator(@NonNull
                                       JSchConnector connection,
                                       @NonNull
                                       SSHUserPassword user)
Method Detail

getAuthenticationMode

@NonNull
public SSHAuthenticator.Mode getAuthenticationMode()
Description copied from class: SSHAuthenticator
Returns the mode of authentication that this SSHAuthenticator supports.

Overrides:
getAuthenticationMode in class SSHAuthenticator<JSchConnector,SSHUserPassword>
Returns:
the mode of authentication that this SSHAuthenticator supports.

canAuthenticate

public boolean canAuthenticate()
Description copied from class: SSHAuthenticator
Returns true if the bound connection is in a state where authentication can be tried using the supplied credentials.

Subclasses can override this if they can tell whether it is possible to make an authentication attempt, default implementation is one-shot always.

Overrides:
canAuthenticate in class SSHAuthenticator<JSchConnector,SSHUserPassword>
Returns:
true if the bound connection is in a state where authentication can be tried using the supplied credentials.

doAuthenticate

protected boolean doAuthenticate()
Description copied from class: SSHAuthenticator
SPI for authenticating the bound connection using the supplied credentials.

Specified by:
doAuthenticate in class SSHAuthenticator<JSchConnector,SSHUserPassword>
Returns:
true if and only if authentication was successful.


Copyright © 2004-2012. All Rights Reserved.