--- /dev/null
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.container.login;
+
+import java.io.Serializable;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A container for login data
+ * <p>
+ * @author Roland Haeder
+ */
+public interface LoginContainer extends Serializable {
+
+ /**
+ * Getter for user instance
+ * <p>
+ * @return User instance
+ */
+ public User getUser ();
+
+ /**
+ * Setter for user instance
+ * <p>
+ * @param user User instance
+ */
+ public void setUser (final User user);
+
+ /**
+ * Getter for user password
+ * <p>
+ * @return User password
+ */
+ public String getUserPassword ();
+
+ /**
+ * Setter for user password
+ * <p>
+ * @param userPassword User password
+ */
+ public void setUserPassword (final String userPassword);
+}
--- /dev/null
+/*
+ * Copyright (C) 2015 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jusercore.container.login;
+
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A user login container
+ * <p>
+ * @author Roland Haeder
+ */
+public class UserLoginContainer implements LoginContainer {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 158_768_718_689_760_186L;
+
+ /**
+ * User instance
+ */
+ private User user;
+
+ /**
+ * Unencrypted password
+ */
+ private String userPassword;
+
+ /**
+ * Constructot with user instance and unencrypted password
+ * <p>
+ * @param user User instance
+ * @param userPassword Unencrypted password
+ */
+ public UserLoginContainer (final User user, final String userPassword) {
+ // Is both set?
+ if (null == user) {
+ // Throw NPE
+ throw new NullPointerException("user is null");
+ } else if (null == userPassword) {
+ // Throw NPE again
+ throw new NullPointerException("userPassword is null");
+ } else if (userPassword.isEmpty()) {
+ // Empty password
+ throw new IllegalArgumentException("user password is empty.");
+ }
+
+ // Set both
+ this.user = user;
+ this.userPassword = userPassword;
+ }
+
+ @Override
+ public User getUser () {
+ return this.user;
+ }
+
+ @Override
+ public void setUser (final User user) {
+ this.user = user;
+ }
+
+ @Override
+ public String getUserPassword () {
+ return this.userPassword;
+ }
+
+ @Override
+ public void setUserPassword (final String userPassword) {
+ this.userPassword = userPassword;
+ }
+
+}