org.picketlink.idm.spi.CredentialStore Maven / Gradle / Ivy
The newest version!
package org.picketlink.idm.spi;
import java.util.List;
import org.picketlink.idm.credential.spi.CredentialStorage;
import org.picketlink.idm.model.Agent;
/**
* An optional interface typically implemented by an IdentityStore that supports the storage of credential related state
*
* @author Shane Bryzak
*
*/
public interface CredentialStore {
/**
* Store the specified credential state
*
* @param storage
*/
void storeCredential(Agent agent, CredentialStorage storage);
/**
* Return the currently active credential state of the specified class, for the specified Agent
*
* @param storageClass
* @return
*/
T retrieveCurrentCredential(Agent agent, Class storageClass);
/**
* Returns a List of all credential state of the specified class, for the specified Agent
*
* @param agent
* @param storageClass
* @return
*/
List retrieveCredentials(Agent agent, Class storageClass);
}