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
AUserInteraction
callback implementation based on aCredentialsProvider
.
-
-
Constructor Summary
Constructors Constructor Description JGitUserInteraction(CredentialsProvider provider)
Creates a newJGitUserInteraction
for interactive password input based on the givenCredentialsProvider
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getUpdatedPassword(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)
boolean
isInteractionAllowed(org.apache.sshd.client.session.ClientSession session)
String
resolveAuthPasswordAttempt(org.apache.sshd.client.session.ClientSession session)
static URIish
toURI(String userName, InetSocketAddress remote)
Creates aURIish
from the given remote address and user name.
-
-
-
Constructor Detail
-
JGitUserInteraction
public JGitUserInteraction(CredentialsProvider provider)
Creates a newJGitUserInteraction
for interactive password input based on the givenCredentialsProvider
.- Parameters:
provider
- to use
-
-
Method Detail
-
isInteractionAllowed
public boolean isInteractionAllowed(org.apache.sshd.client.session.ClientSession session)
- Specified by:
isInteractionAllowed
in 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:
interactive
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
resolveAuthPasswordAttempt
public String resolveAuthPasswordAttempt(org.apache.sshd.client.session.ClientSession session) throws Exception
- Specified by:
resolveAuthPasswordAttempt
in 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:
getUpdatedPassword
in interfaceorg.apache.sshd.client.auth.keyboard.UserInteraction
-
toURI
public static URIish toURI(String userName, InetSocketAddress remote)
Creates aURIish
from the given remote address and user name.- Parameters:
userName
- for the uriremote
- address of the remote host- Returns:
- the uri, with
SshConstants.SSH_SCHEME
as scheme
-
-