public class WalletStoreProvider extends Object implements CredentialStore
Constructor and Description |
---|
WalletStoreProvider(ConfigStoreType type,
String url,
String location,
char[] passPhrase)
Create a config store based wallet retrieving credentials from the server
|
WalletStoreProvider(File dir) |
WalletStoreProvider(File dir,
char[] walletPassword) |
WalletStoreProvider(String dirName) |
WalletStoreProvider(String dirName,
char[] walletPassword) |
Modifier and Type | Method and Description |
---|---|
void |
closeWallet(boolean forcedSave) |
void |
createWallet() |
void |
deleteCredentailsStore()
Delete the underlying wallet.
|
void |
deleteCredential(String alias)
Remove the requested credential from the wallet.
|
void |
deleteCredentials(List<String> aliasList)
Delete a list of credentials from the underlying wallet.
|
boolean |
exists(String alias) |
Credential |
getCredential(String alias)
Return the credential from the wallet store with the provided alias
|
static String |
getDefaultWalletLocation() |
Wallet |
getWallet() |
static boolean |
isAutoLogin(String walletDirectory) |
Credentials |
loadCredentials()
Retrieve a list of credentials from underlying wallet.
|
void |
setCredential(Credential cred) |
void |
setWallet(Wallet wallet) |
void |
storeCredentials(Credentials credentials)
Storing a list of credentials to the underlying wallet.
|
boolean |
walletExists(String location,
char[] walletPassword) |
public WalletStoreProvider(File dir) throws FMWCredentialsException
FMWCredentialsException
public WalletStoreProvider(File dir, char[] walletPassword) throws FMWCredentialsException
FMWCredentialsException
public WalletStoreProvider(String dirName)
public WalletStoreProvider(String dirName, char[] walletPassword) throws FMWCredentialsException
FMWCredentialsException
public WalletStoreProvider(ConfigStoreType type, String url, String location, char[] passPhrase) throws FMWCredentialsException
type
- the type of config store being usedurl
- base URL of the config store serverlocation
- the config store key for retrieving/storing credential datapassPhrase
- the phrase used to encrypt the credential dataFMWCredentialsException
- if an error occurspublic static String getDefaultWalletLocation()
public static boolean isAutoLogin(String walletDirectory) throws FMWCredentialsException
FMWCredentialsException
public Wallet getWallet()
public void setWallet(Wallet wallet)
public void closeWallet(boolean forcedSave) throws FMWCredentialsException
FMWCredentialsException
public void createWallet() throws FMWCredentialsException
FMWCredentialsException
public void deleteCredentailsStore() throws FMWCredentialsException
deleteCredentailsStore
in interface CredentialStore
FMWCredentialsException
- an error occurred when deleting the wallet.public void deleteCredential(String alias) throws FMWCredentialsException
alias
- he alias of the credential to be removedFMWCredentialsException
- if an error occurspublic void deleteCredentials(List<String> aliasList) throws FMWCredentialsException
deleteCredentials
in interface CredentialStore
aliasList
- a list of credential alias that are being deleted.FMWCredentialsException
- an error occurred when deleting credentials from the wallet.public boolean exists(String alias)
public Credentials loadCredentials() throws FMWCredentialsException
loadCredentials
in interface CredentialStore
FMWCredentialsException
- an error occurred when retrieving credentials from the wallet.public Credential getCredential(String alias) throws FMWCredentialsException
CredentialStore
getCredential
in interface CredentialStore
alias
- of the credential in the wallet store. If alias is null, will return a null credentialFMWCredentialsException
- if there was a problem accessing the wallet storepublic void setCredential(Credential cred) throws FMWCredentialsException
FMWCredentialsException
public void storeCredentials(Credentials credentials) throws FMWCredentialsException
storeCredentials
in interface CredentialStore
credentials
- a list of credentials that are being persistedFMWCredentialsException
- an error occurred when storing credentials to the wallet.public boolean walletExists(String location, char[] walletPassword)