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 TypeMethodDescriptionvoidclear()_more_org.apache.http.auth.Credentialsorg.apache.http.auth.CredentialsgetCredentials(org.apache.http.auth.AuthScope scope) Do the authenticationorg.apache.http.auth.CredentialsgetCredentialsnew(org.apache.http.auth.AuthScope scope) _more_static AccountManagerGet the account managergetTable()_more_getUserNamePassword(String key, String label) _more_void_more_voidsetCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials creds) _more_static voidsetGlobalAccountManager(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:
clearin 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:
setCredentialsin 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:
getCredentialsin 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:
getUserNamePasswordin interfaceIOUtil.UserAccountManager- Parameters:
key- _more_label- _more_- Returns:
- _more_
-
removeUserNamePassword
public void removeUserNamePassword()_more_ -
writeTable
protected void writeTable()_more_ -
getTable
_more_- Returns:
- _more_
-