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