public class Credentials extends Object implements Iterable<Credential>
| Constructor and Description |
|---|
Credentials() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAsEncryptedString(SecretKeySpec secretKey)
Convert the credentials store into a single encrypted string that may be stored.
|
Credential |
getCredential(String alias) |
List<Credential> |
getCredentialsAsList()
Return the list of credential objects that are currently stored in the Credentials object
|
Iterator<Credential> |
iterator()
An iterator over the internal Credential collection.
|
Credentials |
setAsString(String creds,
SecretKeySpec secretKey)
Decrypt a encrypted string representation of a credential store and load it and the
credentials of this object.
|
Credentials |
setCredential(Credential cred)
Store a credential to the internal credentials HashMap
|
Credentials |
setCredential(String alias,
char[] password)
Store a credential to the internal credentials HashMap
|
Credentials |
setCredential(String alias,
String userName,
char[] password)
Store a credential to the internal credentials HashMap
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic Credential getCredential(String alias)
public List<Credential> getCredentialsAsList()
public Iterator<Credential> iterator()
iterator in interface Iterable<Credential>public Credentials setCredential(Credential cred)
cred - The credential object that is being stored.Credential object.public Credentials setCredential(String alias, char[] password) throws FMWCredentialsException
alias - alias alias of the credential object that is being stored.password - password of the credential object that is being stored.FMWCredentialsException - if an error occurspublic Credentials setCredential(String alias, String userName, char[] password) throws FMWCredentialsException
alias - alias of the credential object that is being setuserName - userName of the credential object that is being storedpassword - password of the credential object that is being storedFMWCredentialsException - if an error occurspublic String getAsEncryptedString(SecretKeySpec secretKey) throws FMWCredentialsException
secretKey - a SecretKeySpec object used to encrypt the stingFMWCredentialsException - if an error occurspublic Credentials setAsString(String creds, SecretKeySpec secretKey) throws FMWCredentialsException
creds - the string version of the credentialssecretKey - a SecretKeySpec object containing the required info to decrypt the stringFMWCredentialsException - if the string passed is invalid