|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.connector.SimpleCredentialVault
public class SimpleCredentialVault
A simple implementation of a credential vault that does not persist anything to disk or database.
Credentials can be stored and retrieved from this vault but they will be lost when the server is restarted.
That said, this implementation will likely be very useable for any situations where you wish to explicitly challenge the end user but only challenge them once.
Field Summary | |
---|---|
Map<String,Credentials> |
credentialsMap
|
String |
id
|
Constructor Summary | |
---|---|
SimpleCredentialVault(String id)
Instantiates a new simple credential vault. |
Method Summary | |
---|---|
String[] |
getStoredIds()
Returns the ids for stored credentials |
boolean |
hasCredentials(String endpointId)
|
boolean |
load()
Tells the Credential Vault to load state from persisted store |
Credentials |
newCredentials(String endpointId)
Creates new credentials which are stored in this vault |
void |
remove(String endpointId)
Removes credentials for a given endpoint id from the vault |
Credentials |
retrieve(String endpointId)
Retrieves credentials for a given endpoint id from the vault |
boolean |
save()
Tells the Credential Vault to write state to persisted store |
void |
store(Credentials credentials)
Places the given credentials into the vault |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String id
public Map<String,Credentials> credentialsMap
Constructor Detail |
---|
public SimpleCredentialVault(String id)
id
- the idMethod Detail |
---|
public void store(Credentials credentials)
CredentialVault
store
in interface CredentialVault
credentials
- the credentialspublic Credentials retrieve(String endpointId)
CredentialVault
retrieve
in interface CredentialVault
endpointId
- the endpoint id
public void remove(String endpointId)
CredentialVault
remove
in interface CredentialVault
public boolean hasCredentials(String endpointId)
hasCredentials
in interface CredentialVault
public String[] getStoredIds()
CredentialVault
getStoredIds
in interface CredentialVault
public Credentials newCredentials(String endpointId)
CredentialVault
newCredentials
in interface CredentialVault
public boolean load()
CredentialVault
load
in interface CredentialVault
public boolean save()
CredentialVault
save
in interface CredentialVault
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |