Package ucar.unidata.util
Class AccountManager
java.lang.Object
ucar.unidata.util.AccountManager
- All Implemented Interfaces:
org.apache.http.client.CredentialsProvider
,IOUtil.UserAccountManager
public class AccountManager
extends Object
implements org.apache.http.client.CredentialsProvider, IOUtil.UserAccountManager
This class is used to provide authentication of access controlled CDM datasets.
- Version:
- $Id: AccountManager.java,v 1.3 2007/05/09 21:59:26 dmurray Exp $
- Author:
- IDV Development Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
_more_org.apache.http.auth.Credentials
org.apache.http.auth.Credentials
getCredentials
(org.apache.http.auth.AuthScope scope) Do the authenticationorg.apache.http.auth.Credentials
getCredentialsnew
(org.apache.http.auth.AuthScope scope) _more_static AccountManager
Get the account managergetTable()
_more_getUserNamePassword
(String key, String label) _more_void
_more_void
setCredentials
(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials creds) _more_static void
setGlobalAccountManager
(AccountManager manager) Set te global account manager.protected void
_more_
-
Constructor Details
-
AccountManager
constructor- Parameters:
stateDir
- The directory to read/write state to
-
-
Method Details
-
clear
public void clear()_more_- Specified by:
clear
in interfaceorg.apache.http.client.CredentialsProvider
-
getGlobalAccountManager
Get the account manager- Returns:
- The account manager
-
setGlobalAccountManager
Set te global account manager. If one is set already then throw an exception- Parameters:
manager
- Instance of the global account manager
-
setCredentials
public void setCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials creds) _more_- Specified by:
setCredentials
in interfaceorg.apache.http.client.CredentialsProvider
- Parameters:
scope
- _more_creds
-
-
getCredentials
public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope scope) Do the authentication- Specified by:
getCredentials
in interfaceorg.apache.http.client.CredentialsProvider
- Parameters:
scope
- authscope- Returns:
- Null if the user presses cancel. Else return the credentials
-
getCredentials
public org.apache.http.auth.Credentials getCredentials()- Returns:
- _more_
-
getCredentialsnew
public org.apache.http.auth.Credentials getCredentialsnew(org.apache.http.auth.AuthScope scope) _more_- Parameters:
scope
- _more_- Returns:
- _more_
-
getUserNamePassword
_more_- Specified by:
getUserNamePassword
in interfaceIOUtil.UserAccountManager
- Parameters:
key
- _more_label
- _more_- Returns:
- _more_
-
removeUserNamePassword
public void removeUserNamePassword()_more_ -
writeTable
protected void writeTable()_more_ -
getTable
_more_- Returns:
- _more_
-