NIHVIVO-762 make applyMd5Encoding() a public static method so it can be used by UserRetryController, when resetting a user's password.
This commit is contained in:
parent
31fbf6c11f
commit
794466d463
1 changed files with 6 additions and 6 deletions
|
@ -536,11 +536,15 @@ public class Authenticate extends FreemarkerHttpServlet {
|
||||||
return bean;
|
return bean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
// Public utility methods.
|
||||||
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode this password for storage in the database. Apply an MD5 encoding,
|
* Encode this password for storage in the database. Apply an MD5 encoding,
|
||||||
* and store the result as a string of hex digits.
|
* and store the result as a string of hex digits.
|
||||||
*/
|
*/
|
||||||
private String applyMd5Encoding(String password) {
|
public static String applyMd5Encoding(String password) {
|
||||||
try {
|
try {
|
||||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||||
byte[] digest = md.digest(password.getBytes());
|
byte[] digest = md.digest(password.getBytes());
|
||||||
|
@ -552,10 +556,6 @@ public class Authenticate extends FreemarkerHttpServlet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
// Public utility methods.
|
|
||||||
// ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The servlet context should contain a map from User URIs to
|
* The servlet context should contain a map from User URIs to
|
||||||
* {@link HttpSession}s. Get a reference to it, creating it if necessary.
|
* {@link HttpSession}s. Get a reference to it, creating it if necessary.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue