Skip to content
Snippets Groups Projects
Commit b6be3715 authored by Alinga Yeung's avatar Alinga Yeung
Browse files

Story ac2 rework. Changed method name from 'loginUser' to 'doLogin'.

parent ffef3d08
No related branches found
No related tags found
No related merge requests found
...@@ -147,7 +147,7 @@ public interface UserPersistence<T extends Principal> ...@@ -147,7 +147,7 @@ public interface UserPersistence<T extends Principal>
* @throws TransientException If an temporary, unexpected problem occurred. * @throws TransientException If an temporary, unexpected problem occurred.
* @throws AccessControlException If the operation is not permitted. * @throws AccessControlException If the operation is not permitted.
*/ */
Boolean loginUser(String userID, String password) Boolean doLogin(String userID, String password)
throws UserNotFoundException, TransientException, throws UserNotFoundException, TransientException,
AccessControlException; AccessControlException;
......
...@@ -182,7 +182,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO ...@@ -182,7 +182,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
* @throws TransientException * @throws TransientException
* @throws UserNotFoundException * @throws UserNotFoundException
*/ */
public Boolean loginUser(final String username, final String password) public Boolean doLogin(final String username, final String password)
throws TransientException, UserNotFoundException throws TransientException, UserNotFoundException
{ {
try try
...@@ -201,7 +201,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO ...@@ -201,7 +201,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
} }
catch (LDAPException e) catch (LDAPException e)
{ {
logger.debug("loginUser Exception: " + e, e); logger.debug("doLogin Exception: " + e, e);
if (e.getResultCode() == ResultCode.INVALID_CREDENTIALS) if (e.getResultCode() == ResultCode.INVALID_CREDENTIALS)
{ {
......
...@@ -214,14 +214,14 @@ public class LdapUserPersistence<T extends Principal> ...@@ -214,14 +214,14 @@ public class LdapUserPersistence<T extends Principal>
* @throws TransientException If an temporary, unexpected problem occurred. * @throws TransientException If an temporary, unexpected problem occurred.
* @throws AccessControlException If the operation is not permitted. * @throws AccessControlException If the operation is not permitted.
*/ */
public Boolean loginUser(String userID, String password) public Boolean doLogin(String userID, String password)
throws UserNotFoundException, TransientException, AccessControlException throws UserNotFoundException, TransientException, AccessControlException
{ {
LdapUserDAO<T> userDAO = null; LdapUserDAO<T> userDAO = null;
try try
{ {
userDAO = new LdapUserDAO<T>(this.config); userDAO = new LdapUserDAO<T>(this.config);
return userDAO.loginUser(userID, password); return userDAO.doLogin(userID, password);
} }
finally finally
{ {
......
...@@ -106,7 +106,7 @@ public class LoginServlet extends HttpServlet ...@@ -106,7 +106,7 @@ public class LoginServlet extends HttpServlet
{ {
if (StringUtil.hasText(password)) if (StringUtil.hasText(password))
{ {
if (new LdapUserPersistence().loginUser(userID, password)) if (new LdapUserPersistence().doLogin(userID, password))
{ {
String token = new SSOCookieManager().generate(new HttpPrincipal(userID)); String token = new SSOCookieManager().generate(new HttpPrincipal(userID));
response.setContentType(CONTENT_TYPE); response.setContentType(CONTENT_TYPE);
......
...@@ -454,7 +454,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest ...@@ -454,7 +454,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest
{ {
try try
{ {
getUserDAO().loginUser(username, password); getUserDAO().doLogin(username, password);
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -510,7 +510,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest ...@@ -510,7 +510,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest
{ {
try try
{ {
getUserDAO().loginUser(username, password); getUserDAO().doLogin(username, password);
} }
catch (Exception e) catch (Exception e)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment