Package org.eclipse.jgit.console
Class ConsoleAuthenticator
- java.lang.Object
-
- java.net.Authenticator
-
- org.eclipse.jgit.util.CachedAuthenticator
-
- org.eclipse.jgit.console.ConsoleAuthenticator
-
public class ConsoleAuthenticator extends CachedAuthenticator
Basic network prompt for username/password when using the console.- Since:
- 4.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.util.CachedAuthenticator
CachedAuthenticator.CachedAuthentication
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Console
cons
-
Constructor Summary
Constructors Constructor Description ConsoleAuthenticator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
formatRealm()
static void
install()
Install this authenticator implementation into the JVM.protected java.net.PasswordAuthentication
promptPasswordAuthentication()
Prompt for and request authentication from the end-user.-
Methods inherited from class org.eclipse.jgit.util.CachedAuthenticator
add, getPasswordAuthentication
-
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
-
-
-
-
Method Detail
-
install
public static void install()
Install this authenticator implementation into the JVM.
-
promptPasswordAuthentication
protected java.net.PasswordAuthentication promptPasswordAuthentication()
Prompt for and request authentication from the end-user.- Specified by:
promptPasswordAuthentication
in classCachedAuthenticator
- Returns:
- the authentication data; null if the user canceled the request and does not want to continue.
-
formatRealm
private java.lang.String formatRealm()
-
-