Class JGitPasswordAuthentication
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.auth.AbstractUserAuth
org.apache.sshd.client.auth.password.UserAuthPassword
org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthentication
- All Implemented Interfaces:
org.apache.sshd.client.auth.UserAuth
,org.apache.sshd.client.session.ClientSessionHolder
,org.apache.sshd.common.auth.UserAuthInstance<org.apache.sshd.client.session.ClientSession>
,org.apache.sshd.common.NamedResource
public class JGitPasswordAuthentication
extends org.apache.sshd.client.auth.password.UserAuthPassword
A password authentication handler that uses the
JGitUserInteraction
to ask the user for the password. It also respects the
NumberOfPasswordPrompts
ssh config.-
Field Summary
FieldsFields inherited from class org.apache.sshd.client.auth.password.UserAuthPassword
NAME
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getPassword
(org.apache.sshd.client.session.ClientSession session, org.apache.sshd.client.auth.keyboard.UserInteraction interaction) void
protected boolean
sendAuthDataRequest
(org.apache.sshd.client.session.ClientSession session, String service) Methods inherited from class org.apache.sshd.client.auth.password.UserAuthPassword
processAuthDataRequest, resolveAttemptedPassword, sendPassword, signalAuthMethodFailure, signalAuthMethodSuccess
Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth
destroy, getClientSession, getName, getService, getSession, process, toString
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
-
Field Details
-
maxAttempts
private int maxAttempts -
attempts
private int attempts
-
-
Constructor Details
-
JGitPasswordAuthentication
public JGitPasswordAuthentication()
-
-
Method Details
-
init
public void init(org.apache.sshd.client.session.ClientSession session, String service) throws Exception - Specified by:
init
in interfaceorg.apache.sshd.client.auth.UserAuth
- Overrides:
init
in classorg.apache.sshd.client.auth.password.UserAuthPassword
- Throws:
Exception
-
sendAuthDataRequest
protected boolean sendAuthDataRequest(org.apache.sshd.client.session.ClientSession session, String service) throws Exception - Overrides:
sendAuthDataRequest
in classorg.apache.sshd.client.auth.password.UserAuthPassword
- Throws:
Exception
-
getPassword
private String getPassword(org.apache.sshd.client.session.ClientSession session, org.apache.sshd.client.auth.keyboard.UserInteraction interaction)
-