Remove HttpSession dependency in UserService phase 1 complete

This commit is contained in:
Sankaranarayanan Viswanathan
2014-10-09 20:53:38 -04:00
parent 54cc265ee6
commit 326ee79c8c
3 changed files with 57 additions and 15 deletions

View File

@@ -60,17 +60,6 @@ public class UserService {
return Optional.absent();
}
/**
* try to log in with given credentials and create a session for the user
*/
public Optional<User> login(String nameOrEmail, String password, HttpSession sessionToFill) {
Optional<User> user = login(nameOrEmail, password);
if (user.isPresent()) {
sessionToFill.setAttribute(UserREST.SESSION_KEY_USER, user.get());
}
return user;
}
/**
* try to log in by checking if the user has an active session
*/