Document that EPerson's password, salt and algorithm setters are related. #3363

This commit is contained in:
Mark H. Wood
2021-08-13 15:56:26 -04:00
parent d9a04c26fd
commit 3f06c7e79c

View File

@@ -37,7 +37,6 @@ import org.hibernate.proxy.HibernateProxyHelper;
* Class representing an e-person.
*
* @author David Stuve
* @version $Revision$
*/
@Entity
@Cacheable
@@ -381,6 +380,13 @@ public class EPerson extends DSpaceObject implements DSpaceObjectLegacySupport {
return digestAlgorithm;
}
/**
* Store the digest algorithm used to hash the password. You should also
* set the {@link setPassword password hash} and the
* {@link setDigestAlgorithm digest algorithm}.
*
* @param digestAlgorithm
*/
void setDigestAlgorithm(String digestAlgorithm) {
this.digestAlgorithm = digestAlgorithm;
}
@@ -389,6 +395,13 @@ public class EPerson extends DSpaceObject implements DSpaceObjectLegacySupport {
return salt;
}
/**
* Store the salt used when hashing the password. You should also set the
* {@link setPassword password hash} and the {@link setDigestAlgorithm
* digest algorithm}.
*
* @param salt
*/
void setSalt(String salt) {
this.salt = salt;
}
@@ -397,6 +410,12 @@ public class EPerson extends DSpaceObject implements DSpaceObjectLegacySupport {
return password;
}
/**
* Store the <strong>hash of a</strong> password. You should also set the
* {@link setSalt salt} and the {@link setDigestAlgorithm digest algorithm}.
*
* @param password
*/
void setPassword(String password) {
this.password = password;
}