2 * Copyright (C) 2016 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation, either version 3 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
14 * You should have received a copy of the GNU Affero General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jjobs.beans.login;
19 import java.io.Serializable;
20 import java.util.List;
21 import javax.ejb.Local;
22 import org.mxchange.jusercore.model.user.User;
23 import org.mxchange.jusercore.model.user.password_history.PasswordHistory;
26 * An interface for registration web controllers
28 * @author Roland Haeder<roland@mxchange.org>
31 public interface JobsUserLoginWebSessionController extends Serializable {
34 * Getter for template type
36 * @return Template type
38 String getTemplateType ();
41 * Setter for template type
43 * @param templateType Template type
45 void setTemplateType (final String templateType);
48 * Logins the user, if the account is found, confirmed and unlocked.
50 * @return Redirect target
55 * Getter for logged-in user instance
57 * @return Logged-in user instance
59 User getLoggedInUser ();
62 * Setter for logged-in user instance
64 * @param loggedInUser Logged-in user instance
66 void setLoggedInUser (final User loggedInUser);
69 * Checks whether the user is logged-in
71 * @return Whether the user is logged-in
73 boolean isUserLoggedIn ();
76 * Checks whether the user needs to change password
78 * @return Whether the user needs to change password
80 boolean ifUserMustChangePassword ();
83 * Whether the currently logged-in user is invisible
85 * @return Whether the currently logged-in user is invisible
87 boolean isInvisible ();
90 * Setter for current password (clear text)
92 * @param currentPassword Current password
94 void setCurrentPassword (final String currentPassword);
97 * Getter for current password (clear text)
99 * @return Current password
101 String getCurrentPassword ();
104 * Checks whether the (previously entered) current password matches with
105 * from the user instance.
107 * @return If current password matches
109 boolean ifCurrentPasswordMatches ();
112 * Getter for user's password history
114 * @return User's password history
116 List<PasswordHistory> getUserPasswordHistory ();