Interface CredentialStore
-
- All Known Implementing Classes:
JndiLdapCredentialStore,MockCredentialStoreManagedObjectSource,PasswordFileCredentialStore
public interface CredentialStoreStore containing the credentials.
This is a standard interface to allow various credential stores to be utilised as a dependency for
HttpSecuritySource.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_ALGORITHMDefault algorithm.static java.lang.StringNO_ALGORITHMNon-blank value indicating no algorithm.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()Obtains the algorithm used to encrypt credentials within thisCredentialStore.CredentialEntryretrieveCredentialEntry(java.lang.String userId, java.lang.String realm)Retrieves theCredentialEntry.
-
-
-
Field Detail
-
DEFAULT_ALGORITHM
static final java.lang.String DEFAULT_ALGORITHM
Default algorithm.- See Also:
- Constant Field Values
-
NO_ALGORITHM
static final java.lang.String NO_ALGORITHM
Non-blank value indicating no algorithm.
This is useful for property configurations of
ManagedObjectSourceandManagedFunctionSourceinstances that need to indicate an algorithm (and can not provide blank values for required properties).- See Also:
- Constant Field Values
-
-
Method Detail
-
getAlgorithm
java.lang.String getAlgorithm()
Obtains the algorithm used to encrypt credentials within this
CredentialStore.Should the return be
null, blank orNO_ALGORITHMthen the password is considered to be stored in plain text. This is however only useful for theBASICauthentication scheme due to the nature of the other authentication schemes (such asDIGEST).It is expected that the credentials for
DIGESTwill be stored as the algorithm applied touserId:realm:password(as per RFC 2617). This is necessary as the password is never supplied and therefore forDIGESTthis MUST return an algorithm.- Returns:
- Algorithm.
-
retrieveCredentialEntry
CredentialEntry retrieveCredentialEntry(java.lang.String userId, java.lang.String realm) throws HttpException
Retrieves theCredentialEntry.- Parameters:
userId- User identifier.realm- Realm. May benull(especially in the case forBasicauthentication).- Returns:
CredentialEntryornullif noCredentialEntryexists for parameters.- Throws:
HttpException- If fails to retrieveCredentialEntry.
-
-