org.eclipse.jgit.util
Class CachedAuthenticator

java.lang.Object
  extended by java.net.Authenticator
      extended by org.eclipse.jgit.util.CachedAuthenticator

public abstract class CachedAuthenticator
extends java.net.Authenticator

Abstract authenticator which remembers prior authentications.


Nested Class Summary
static class CachedAuthenticator.CachedAuthentication
          Authentication data to remember and reuse.
 
Nested classes/interfaces inherited from class java.net.Authenticator
java.net.Authenticator.RequestorType
 
Constructor Summary
CachedAuthenticator()
           
 
Method Summary
static void add(CachedAuthenticator.CachedAuthentication ca)
          Add a cached authentication for future use.
protected  java.net.PasswordAuthentication getPasswordAuthentication()
           
protected abstract  java.net.PasswordAuthentication promptPasswordAuthentication()
          Prompt for and request authentication from the end-user.
 
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedAuthenticator

public CachedAuthenticator()
Method Detail

add

public static void add(CachedAuthenticator.CachedAuthentication ca)
Add a cached authentication for future use.

Parameters:
ca - the information we should remember.

getPasswordAuthentication

protected final java.net.PasswordAuthentication getPasswordAuthentication()
Overrides:
getPasswordAuthentication in class java.net.Authenticator

promptPasswordAuthentication

protected abstract java.net.PasswordAuthentication 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.


Copyright © 2013. All Rights Reserved.