|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CredentialsAgent
A CredentialsAgent manages two credentials:
Authenticator.RequestorType.SERVER which is equal to the OSM API credentials
in JOSMAuthenticator.RequestorType.PROXY which is equal to the credentials for an
optional HTTP proxy server a user may use
| Method Summary | |
|---|---|
CredentialsAgentResponse |
getCredentials(java.net.Authenticator.RequestorType requestorType,
java.lang.String host,
boolean noSuccessWithLastResponse)
|
java.awt.Component |
getPreferencesDecorationPanel()
Provide a Panel that is shown below the API password / username fields in the JOSM Preferences. |
java.net.PasswordAuthentication |
lookup(java.net.Authenticator.RequestorType requestorType,
java.lang.String host)
Looks up the credentials for a given type. |
OAuthToken |
lookupOAuthAccessToken()
Lookup the current OAuth Access Token to access the OSM server. |
void |
store(java.net.Authenticator.RequestorType requestorType,
java.lang.String host,
java.net.PasswordAuthentication credentials)
Saves the credentials in credentials for the given service type. |
void |
storeOAuthAccessToken(OAuthToken accessToken)
Stores the OAuth Access Token accessToken. |
| Method Detail |
|---|
java.net.PasswordAuthentication lookup(java.net.Authenticator.RequestorType requestorType,
java.lang.String host)
throws CredentialsAgentException
the - type of service. Authenticator.RequestorType.SERVER for the OSM API server, Authenticator.RequestorType.PROXY
for a proxy server
CredentialsAgentException - thrown if a problem occurs in a implementation of this interface
void store(java.net.Authenticator.RequestorType requestorType,
java.lang.String host,
java.net.PasswordAuthentication credentials)
throws CredentialsAgentException
credentials for the given service type.
the - type of service. Authenticator.RequestorType.SERVER for the OSM API server, Authenticator.RequestorType.PROXY
for a proxy servercredentials - the credentials
CredentialsManagerException - thrown if a problem occurs in a implementation of this interface
CredentialsAgentException
CredentialsAgentResponse getCredentials(java.net.Authenticator.RequestorType requestorType,
java.lang.String host,
boolean noSuccessWithLastResponse)
throws CredentialsAgentException
requestorType - the type of service. Authenticator.RequestorType.SERVER for the OSM API server, Authenticator.RequestorType.PROXY
for a proxy servernoSuccessWithLastResponse - 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.
CredentialsAgentException - thrown if a problem occurs in a implementation of this interface
OAuthToken lookupOAuthAccessToken()
throws CredentialsAgentException
CredentialsAgentException - thrown if something goes wrong
void storeOAuthAccessToken(OAuthToken accessToken)
throws CredentialsAgentException
accessToken.
accessToken - the access Token. null, to remove the Access Token.
CredentialsAgentException - thrown if something goes wrongjava.awt.Component getPreferencesDecorationPanel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||