Commit b6be3715 authored by Alinga Yeung's avatar Alinga Yeung
Browse files

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

parent ffef3d08
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ public interface UserPersistence<T extends Principal>
     * @throws TransientException If an temporary, unexpected problem occurred.
     * @throws AccessControlException If the operation is not permitted.
     */
    Boolean loginUser(String userID, String password)
    Boolean doLogin(String userID, String password)
            throws UserNotFoundException, TransientException, 
            AccessControlException;
   
+2 −2
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
     * @throws TransientException
     * @throws UserNotFoundException
     */
    public Boolean loginUser(final String username, final String password)
    public Boolean doLogin(final String username, final String password)
        throws TransientException, UserNotFoundException
    {
        try
@@ -201,7 +201,7 @@ public class LdapUserDAO<T extends Principal> extends LdapDAO
        }
        catch (LDAPException e)
        {
            logger.debug("loginUser Exception: " + e, e);
            logger.debug("doLogin Exception: " + e, e);

            if (e.getResultCode() == ResultCode.INVALID_CREDENTIALS)
            {
+2 −2
Original line number Diff line number Diff line
@@ -214,14 +214,14 @@ public class LdapUserPersistence<T extends Principal>
     * @throws TransientException If an temporary, unexpected problem occurred.
     * @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
    {
        LdapUserDAO<T> userDAO = null;
        try
        {
            userDAO = new LdapUserDAO<T>(this.config);
            return userDAO.loginUser(userID, password);
            return userDAO.doLogin(userID, password);
        }
        finally
        {
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ public class LoginServlet extends HttpServlet
            {
                if (StringUtil.hasText(password))
                {
                	if (new LdapUserPersistence().loginUser(userID, password))
                	if (new LdapUserPersistence().doLogin(userID, password))
                	{
	            	    String token = new SSOCookieManager().generate(new HttpPrincipal(userID));
	            	    response.setContentType(CONTENT_TYPE);
+2 −2
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest
            {
                try
                {
                    getUserDAO().loginUser(username, password);
                    getUserDAO().doLogin(username, password);
                }
                catch (Exception e)
                {
@@ -510,7 +510,7 @@ public class LdapUserDAOTest extends AbstractLdapDAOTest
            {
                try
                {
                    getUserDAO().loginUser(username, password);
                    getUserDAO().doLogin(username, password);
                }
                catch (Exception e)
                {