org.openstreetmap.josm.io.auth
Class AbstractCredentialsAgent

java.lang.Object
  extended by org.openstreetmap.josm.io.auth.AbstractCredentialsAgent
All Implemented Interfaces:
CredentialsAgent
Direct Known Subclasses:
JosmPreferencesCredentialAgent

public abstract class AbstractCredentialsAgent
extends java.lang.Object
implements CredentialsAgent


Field Summary
protected  java.util.Map<java.net.Authenticator.RequestorType,java.net.PasswordAuthentication> memoryCredentialsCache
           
 
Constructor Summary
AbstractCredentialsAgent()
           
 
Method Summary
 CredentialsAgentResponse getCredentials(java.net.Authenticator.RequestorType requestorType, java.lang.String host, boolean noSuccessWithLastResponse)
           
abstract  java.lang.String getSaveUsernameAndPasswordCheckboxText()
          Provide the text for a checkbox that offers to save the username and password that has been entered by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openstreetmap.josm.io.auth.CredentialsAgent
getPreferencesDecorationPanel, lookup, lookupOAuthAccessToken, store, storeOAuthAccessToken
 

Field Detail

memoryCredentialsCache

protected java.util.Map<java.net.Authenticator.RequestorType,java.net.PasswordAuthentication> memoryCredentialsCache
Constructor Detail

AbstractCredentialsAgent

public AbstractCredentialsAgent()
Method Detail

getCredentials

public CredentialsAgentResponse getCredentials(java.net.Authenticator.RequestorType requestorType,
                                               java.lang.String host,
                                               boolean noSuccessWithLastResponse)
                                        throws CredentialsAgentException
Specified by:
getCredentials in interface CredentialsAgent
Parameters:
requestorType - the type of service. Authenticator.RequestorType.SERVER for the OSM API server, Authenticator.RequestorType.PROXY for a proxy server
noSuccessWithLastResponse - true, if the last request with the supplied credentials failed; false otherwise. If true, implementations of this interface are advised to prompt the user for new credentials.
Throws:
CredentialsAgentException - thrown if a problem occurs in a implementation of this interface
See Also:
CredentialsAgent#getCredentials(RequestorType, boolean)

getSaveUsernameAndPasswordCheckboxText

public abstract java.lang.String getSaveUsernameAndPasswordCheckboxText()
Provide the text for a checkbox that offers to save the username and password that has been entered by the user.



JOSM