Package org.eclipse.jgit.util
Class CachedAuthenticator
java.lang.Object
java.net.Authenticator
org.eclipse.jgit.util.CachedAuthenticator
- Direct Known Subclasses:
AwtAuthenticator,ConsoleAuthenticator
Abstract authenticator which remembers prior authentications.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAuthentication data to remember and reuse.Nested classes/interfaces inherited from class java.net.Authenticator
Authenticator.RequestorType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Collection<CachedAuthenticator.CachedAuthentication> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd a cached authentication for future use.protected final PasswordAuthenticationprotected abstract PasswordAuthenticationPrompt for and request authentication from the end-user.Methods inherited from class java.net.Authenticator
getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
-
Field Details
-
cached
-
-
Constructor Details
-
CachedAuthenticator
public CachedAuthenticator()
-
-
Method Details
-
add
Add a cached authentication for future use.- Parameters:
ca- the information we should remember.
-
getPasswordAuthentication
- Overrides:
getPasswordAuthenticationin classAuthenticator
-
promptPasswordAuthentication
Prompt for and request authentication from the end-user.- Returns:
- the authentication data; null if the user canceled the request and does not want to continue.
-