Top Description Inners Fields Constructors Methods
org.eclipse.jgit.util

public abstract Class CachedAuthenticator

extends Authenticator
Class Inheritance
Imports
java.net.Authenticator, .PasswordAuthentication, java.util.Collection, java.util.concurrent.CopyOnWriteArrayList

Abstract authenticator which remembers prior authentications.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CachedAuthenticator.CachedAuthentication

Authentication data to remember and reuse.

Field Summary

Modifier and TypeField and Description
private static final Collection<CachedAuthenticator.CachedAuthentication>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
add(CachedAuthenticator.CachedAuthentication
the information we should remember.
ca
)

Add a cached authentication for future use.

protected final PasswordAuthentication
getPasswordAuthentication()

Overrides java.net.Authenticator.getPasswordAuthentication.

Called when password authorization is needed.

protected abstract PasswordAuthentication

Returns:

the authentication data; null if the user canceled the request and does not want to continue.
promptPasswordAuthentication
()

Prompt for and request authentication from the end-user.

Inherited from java.net.Authenticator:
getDefaultgetRequestingHostgetRequestingPortgetRequestingPromptgetRequestingProtocolgetRequestingSchemegetRequestingSitegetRequestingURLgetRequestorTyperequestPasswordAuthenticationrequestPasswordAuthenticationrequestPasswordAuthenticationrequestPasswordAuthenticationrequestPasswordAuthenticationInstancesetDefault

Field Detail

cachedback to summary
private static final Collection<CachedAuthenticator.CachedAuthentication> cached

Constructor Detail

CachedAuthenticatorback to summary
public CachedAuthenticator()

Method Detail

addback to summary
public static void add(CachedAuthenticator.CachedAuthentication ca)

Add a cached authentication for future use.

Parameters
ca:CachedAuthenticator.CachedAuthentication

the information we should remember.

getPasswordAuthenticationback to summary
protected final PasswordAuthentication getPasswordAuthentication()

Overrides java.net.Authenticator.getPasswordAuthentication.

Doc from java.net.Authenticator.getPasswordAuthentication.

Called when password authorization is needed. Subclasses should override the default implementation, which returns null.

Returns:PasswordAuthentication

The PasswordAuthentication collected from the user, or null if none is provided.

Annotations
@Override
promptPasswordAuthenticationback to summary
protected abstract PasswordAuthentication promptPasswordAuthentication()

Prompt for and request authentication from the end-user.

Returns:PasswordAuthentication

the authentication data; null if the user canceled the request and does not want to continue.

org.eclipse.jgit.util back to summary

public Class CachedAuthenticator.CachedAuthentication

extends Object
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.util.CachedAuthenticator.CachedAuthentication

Authentication data to remember and reuse.

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final String
pack-priv final int
pack-priv final String

Constructor Summary

AccessConstructor and Description
public
CachedAuthentication(final String
system this is for.
aHost
,
final int
port number of the service.
aPort
,
final String
username at the service.
aUser
,
final String
password at the service.
aPass
)

Create a new cached authentication.

Method Summary

Modifier and TypeMethod and Description
pack-priv PasswordAuthentication
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hostback to summary
pack-priv final String host
passback to summary
pack-priv final String pass
portback to summary
pack-priv final int port
userback to summary
pack-priv final String user

Constructor Detail

CachedAuthenticationback to summary
public CachedAuthentication(final String aHost, final int aPort, final String aUser, final String aPass)

Create a new cached authentication.

Parameters
aHost:String

system this is for.

aPort:int

port number of the service.

aUser:String

username at the service.

aPass:String

password at the service.

Method Detail

toPasswordAuthenticationback to summary
pack-priv PasswordAuthentication toPasswordAuthentication()