org.openstreetmap.josm.io.auth
Class DefaultAuthenticator

java.lang.Object
  extended by java.net.Authenticator
      extended by org.openstreetmap.josm.io.auth.DefaultAuthenticator

public class DefaultAuthenticator
extends java.net.Authenticator

This is the default authenticator used in JOSM. It delegates lookup of credentials for the OSM API and an optional proxy server to the currently configured CredentialsManager.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.Authenticator
java.net.Authenticator.RequestorType
 
Field Summary
private  java.util.Map<java.net.Authenticator.RequestorType,java.lang.Boolean> credentialsTried
           
private  boolean enabled
           
private static DefaultAuthenticator instance
           
 
Constructor Summary
private DefaultAuthenticator()
           
 
Method Summary
static void createInstance()
           
static DefaultAuthenticator getInstance()
           
protected  java.net.PasswordAuthentication getPasswordAuthentication()
          Called by the Java http stack when either the OSM API server or a proxy requires authentication.
 boolean isEnabled()
           
 void setEnabled(boolean enabled)
           
 
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
 

Field Detail

instance

private static DefaultAuthenticator instance

credentialsTried

private final java.util.Map<java.net.Authenticator.RequestorType,java.lang.Boolean> credentialsTried

enabled

private boolean enabled
Constructor Detail

DefaultAuthenticator

private DefaultAuthenticator()
Method Detail

getInstance

public static DefaultAuthenticator getInstance()

createInstance

public static void createInstance()

getPasswordAuthentication

protected java.net.PasswordAuthentication getPasswordAuthentication()
Called by the Java http stack when either the OSM API server or a proxy requires authentication.

Overrides:
getPasswordAuthentication in class java.net.Authenticator

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)


JOSM