Class JndiLdapCredentialStore
- java.lang.Object
-
- net.officefloor.web.security.store.JndiLdapCredentialStore
-
- All Implemented Interfaces:
CredentialStore
public class JndiLdapCredentialStore extends java.lang.Object implements CredentialStore
CredentialStoreforDirContext.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from interface net.officefloor.web.security.store.CredentialStore
DEFAULT_ALGORITHM, NO_ALGORITHM
-
-
Constructor Summary
Constructors Constructor Description JndiLdapCredentialStore(java.lang.String algorithm, javax.naming.directory.DirContext context, java.lang.String entrySearchBaseDn, java.lang.String rolesSearchBaseDn)Initiate.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
JndiLdapCredentialStore
public JndiLdapCredentialStore(java.lang.String algorithm, javax.naming.directory.DirContext context, java.lang.String entrySearchBaseDn, java.lang.String rolesSearchBaseDn)Initiate.- Parameters:
algorithm- Algorithm.context-DirContext.entrySearchBaseDn- Base dn for searching for entries.rolesSearchBaseDn- Base dn for searching for roles.
-
-
Method Detail
-
getAlgorithm
public java.lang.String 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
public CredentialEntry retrieveCredentialEntry(java.lang.String userId, java.lang.String realm) throws HttpException
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.
-
-