Class JndiLdapCredentialStore
java.lang.Object
net.officefloor.web.security.store.JndiLdapCredentialStore
- All Implemented Interfaces:
CredentialStore
- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from interface net.officefloor.web.security.store.CredentialStore
DEFAULT_ALGORITHM, NO_ALGORITHM -
Constructor Summary
ConstructorsConstructorDescriptionJndiLdapCredentialStore(String algorithm, DirContext context, String entrySearchBaseDn, String rolesSearchBaseDn) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionObtains the algorithm used to encrypt credentials within thisCredentialStore.retrieveCredentialEntry(String userId, String realm) Retrieves theCredentialEntry.
-
Constructor Details
-
JndiLdapCredentialStore
public JndiLdapCredentialStore(String algorithm, DirContext context, String entrySearchBaseDn, String rolesSearchBaseDn) Initiate.- Parameters:
algorithm- Algorithm.context-DirContext.entrySearchBaseDn- Base dn for searching for entries.rolesSearchBaseDn- Base dn for searching for roles.
-
-
Method Details
-
getAlgorithm
Description copied from interface:CredentialStoreObtains the algorithm used to encrypt credentials within this
CredentialStore.Should the return be
null, blank orCredentialStore.NO_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.- Specified by:
getAlgorithmin interfaceCredentialStore- Returns:
- Algorithm.
-
retrieveCredentialEntry
Description copied from interface:CredentialStoreRetrieves theCredentialEntry.- Specified by:
retrieveCredentialEntryin interfaceCredentialStore- Parameters:
userId- User identifier.realm- Realm. May benull(especially in the case forBasicauthentication).- Returns:
CredentialEntryornullif noCredentialEntryexists for parameters.- Throws:
HttpException- If fails to retrieveCredentialEntry.
-