@Test public void testLogInUser() throws Exception { Authenticator connector = new Authenticator(connection); String username = "TestAccount2"; String password = "testPassword"; connector.logInUser(username, password); User user = connector.lookUpUser(username); Assert.assertTrue(user.isLoggedIn()); }
public User logInUser(String username, String password) throws LoginException { User user = getUserWithValidPassword(username, password); updateLoggedinColumn(username, true); user.setLoggedIn(true); return user; }
Authenticator { public User logInUser(String username, String password) throws LoginException { User user = getUserWithValidPassword(username, password); updateLoggedinColumn(username, true); user.setLoggedIn(true); return user; } }
Authenticator { public User logInUser(String username, String password) throws LoginException { User user = getUserWithValidPassword(username, password); updateLoggedinColumn(username, true); user.setLoggedIn(true); return user; } Authenticator(Connection dbConnection); }
Authenticator { public User logInUser(String username, String password) throws LoginException { User user = getUserWithValidPassword(username, password); updateLoggedinColumn(username, true); user.setLoggedIn(true); return user; } Authenticator(Connection dbConnection); static String getSaltedSHA256String(String input, String salt); User logInUser(String username, String password); User lookUpUser(String username); Map<String, Object> lookUpUserProperties(String username); User logOutUser(String username); Object lookUpUserProperty(String username, String propertyName); static boolean isWrapperType(Class<?> clazz); }
Authenticator { public User logInUser(String username, String password) throws LoginException { User user = getUserWithValidPassword(username, password); updateLoggedinColumn(username, true); user.setLoggedIn(true); return user; } Authenticator(Connection dbConnection); static String getSaltedSHA256String(String input, String salt); User logInUser(String username, String password); User lookUpUser(String username); Map<String, Object> lookUpUserProperties(String username); User logOutUser(String username); Object lookUpUserProperty(String username, String propertyName); static boolean isWrapperType(Class<?> clazz); static final int HEX_CONVERSION_CONSTANT; }