Module org.eclipse.jgit.ssh.apache
Class JGitUserInteraction
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.JGitUserInteraction
- All Implemented Interfaces:
org.apache.sshd.client.auth.keyboard.UserInteraction
public class JGitUserInteraction
extends Object
implements org.apache.sshd.client.auth.keyboard.UserInteraction
A
UserInteraction callback implementation based on a
CredentialsProvider.-
Field Summary
Fields inherited from interface org.apache.sshd.client.auth.keyboard.UserInteraction
AUTO_DETECT_PASSWORD_PROMPT, CHECK_INTERACTIVE_PASSWORD_DELIM, DEFAULT_AUTO_DETECT_PASSWORD_PROMPT, DEFAULT_CHECK_INTERACTIVE_PASSWORD_DELIM, DEFAULT_INTERACTIVE_PASSWORD_PROMPT, INTERACTIVE_PASSWORD_PROMPT, NONE -
Constructor Summary
ConstructorsConstructorDescriptionJGitUserInteraction(CredentialsProvider provider) Creates a newJGitUserInteractionfor interactive password input based on the givenCredentialsProvider. -
Method Summary
Modifier and TypeMethodDescriptiongetUpdatedPassword(org.apache.sshd.client.session.ClientSession session, String prompt, String lang) String[]interactive(org.apache.sshd.client.session.ClientSession session, String name, String instruction, String lang, String[] prompt, boolean[] echo) booleanisInteractionAllowed(org.apache.sshd.client.session.ClientSession session) resolveAuthPasswordAttempt(org.apache.sshd.client.session.ClientSession session) static URIishtoURI(String userName, InetSocketAddress remote) Creates aURIishfrom the given remote address and user name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.client.auth.keyboard.UserInteraction
resolveAuthPublicKeyIdentityAttempt, serverVersionInfo, welcome
-
Constructor Details
-
JGitUserInteraction
Creates a newJGitUserInteractionfor interactive password input based on the givenCredentialsProvider.- Parameters:
provider- to use
-
-
Method Details
-
isInteractionAllowed
public boolean isInteractionAllowed(org.apache.sshd.client.session.ClientSession session) - Specified by:
isInteractionAllowedin interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
interactive
public String[] interactive(org.apache.sshd.client.session.ClientSession session, String name, String instruction, String lang, String[] prompt, boolean[] echo) - Specified by:
interactivein interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
resolveAuthPasswordAttempt
public String resolveAuthPasswordAttempt(org.apache.sshd.client.session.ClientSession session) throws Exception - Specified by:
resolveAuthPasswordAttemptin interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction- Throws:
Exception
-
getUpdatedPassword
public String getUpdatedPassword(org.apache.sshd.client.session.ClientSession session, String prompt, String lang) - Specified by:
getUpdatedPasswordin interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
toURI
Creates aURIishfrom the given remote address and user name.- Parameters:
userName- for the uriremote- address of the remote host- Returns:
- the uri, with
SshConstants.SSH_SCHEMEas scheme
-