Package passport.domain.contexts.user
Class UserLogin
java.lang.Object
passport.domain.contexts.user.UserLogin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncurrent()
boolean
isLoggedAs
(String email) void
Logs in the user with the specified email and password.void
logOut()
Logs out the current session.withSession
(Session session) Associates the current login context with a session.
-
Constructor Details
-
UserLogin
Constructs a UserLogin context with the specified user repository.- Parameters:
users
- the repository of users
-
UserLogin
-
-
Method Details
-
withSession
-
logAs
Logs in the user with the specified email and password.- Parameters:
login
- the login of the user- Throws:
PermissionDenied
- if the login credentials are incorrect
-
isLoggedAs
-
current
-
logOut
public void logOut()Logs out the current session.
-