UserInteraction callback implementation based on a
CredentialsProvider.
| Modifier and Type | Class and Description |
|---|---|
| private static class | JGitUserInteraction.
A |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | ongoing
We need to reset the JGit credentials provider if we have repeated attempts. |
| private final CredentialsProvider |
| Access | Constructor and Description |
|---|---|
| public | JGitUserInteraction(CredentialsProvider
to use provider)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public String | getUpdatedPassword(ClientSession
The session, String ClientSession through which the request was receivedThe server's prompt (may be empty) prompt, String The prompt's language (may be empty) lang)Implements org. Invoked when the server returns an |
| public String[] | interactive(ClientSession
The session, String ClientSession through which the request was receivedThe interaction name (may be empty) name, String The instruction (may be empty) instruction, String The language for the data (may be empty) lang, String[] The prompts to be displayed (may be empty) prompt, boolean[] For each prompt whether to echo the user's response echo)Implements org. Invoked when "keyboard-interactive" authentication mechanism is used in order to provide responses for the server's challenges (a.k.a. prompts) |
| public boolean | isInteractionAllowed(ClientSession
The session)ClientSessionOverrides default org.
|
| public String | resolveAuthPasswordAttempt(ClientSession
The session)ClientSession through which the request was receivedOverrides default org. Invoked during password authentication when no more pre-registered passwords are available |
| public static URIish | Returns: the uri, withSshConstants#SSH_SCHEME as schemefor the uri userName, InetSocketAddress address of the remote host remote)Creates a |
| ongoing | back to summary |
|---|---|
| private final Map<Session, SessionListener> ongoing We need to reset the JGit credentials provider if we have repeated attempts. | |
| provider | back to summary |
|---|---|
| private final CredentialsProvider provider | |
| JGitUserInteraction | back to summary |
|---|---|
| public JGitUserInteraction(CredentialsProvider provider) Creates a new
| |
| getUpdatedPassword | back to summary |
|---|---|
| public String getUpdatedPassword(ClientSession session, String prompt, String lang) Implements org. Doc from org. Invoked when the server returns an
| |
| interactive | back to summary |
|---|---|
| public String[] interactive(ClientSession session, String name, String instruction, String lang, String[] prompt, boolean[] echo) Implements org. Doc from org. Invoked when "keyboard-interactive" authentication mechanism is used in order to provide responses for the server's challenges (a.k.a. prompts)
| |
| isInteractionAllowed | back to summary |
|---|---|
| public boolean isInteractionAllowed(ClientSession session) Overrides default org.
| |
| resolveAuthPasswordAttempt | back to summary |
|---|---|
| public String resolveAuthPasswordAttempt(ClientSession session) throws Exception Overrides default org. Doc from org. Invoked during password authentication when no more pre-registered passwords are available
| |
| toURI | back to summary |
|---|---|
| public static URIish toURI(String userName, InetSocketAddress remote) Creates a
| |
SessionListener that removes itself from the session when
authentication is done or the session is closed.
| Modifier and Type | Field and Description |
|---|---|
| private final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | sessionClosed(Session
The closed session)SessionOverrides default org. A session has been closed |
| public void | sessionEvent(Session
The referenced session, SessionListener.SessionThe generated eventEventOverrides default org. An event has been triggered |
| registered | back to summary |
|---|---|
| private final Map<Session, SessionListener> registered | |
| SessionAuthMarker | back to summary |
|---|---|
| public SessionAuthMarker(Map<Session, SessionListener> registered) | |
| sessionClosed | back to summary |
|---|---|
| public void sessionClosed(Session session) Overrides default org. Doc from org. A session has been closed | |
| sessionEvent | back to summary |
|---|---|
| public void sessionEvent(Session session, SessionListener. Overrides default org. Doc from org. An event has been triggered | |