mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
Remove HttpSession dependency in UserService phase 1 complete
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user