org.springframework.extensions.webscripts.connector
Interface CredentialVault

All Known Implementing Classes:
AbstractPersistentCredentialVault, SimpleCredentialVault, XMLCredentialVault

public interface CredentialVault

Interface for a Credential Vault Credential vaults allow for the storage and retrieval of credentials by credential id. They can also be loaded and saved if they are backed by a persisted storage location.

Author:
muzquiano

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
 

Method Detail

store

void store(Credentials credentials)
Places the given credentials into the vault

Parameters:
credentials - the credentials

retrieve

Credentials retrieve(String endpointId)
Retrieves credentials for a given endpoint id from the vault

Parameters:
endpointId - the endpoint id
Returns:
the credentials

remove

void remove(String endpointId)
Removes credentials for a given endpoint id from the vault

Parameters:
endpointId -

hasCredentials

boolean hasCredentials(String endpointId)
Returns:
true if any credentials are stored for this endpoint id

newCredentials

Credentials newCredentials(String endpointId)
Creates new credentials which are stored in this vault

Parameters:
endpointId -
Returns:
the credentials object

getStoredIds

String[] getStoredIds()
Returns the ids for stored credentials

Returns:

load

boolean load()
Tells the Credential Vault to load state from persisted store

Returns:
whether the credential vault successfully loaded

save

boolean save()
Tells the Credential Vault to write state to persisted store

Returns:
whether the credential vault successfully saved


Copyright © 2009 SpringSource, Inc. All Rights Reserved.