Improved Login security
This commit is contained in:
		@@ -1,7 +1,5 @@
 | 
			
		||||
package envoy.event;
 | 
			
		||||
 | 
			
		||||
import envoy.data.LoginCredentials;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Signifies to the client that the handshake failed for the attached
 | 
			
		||||
 * reason.<br>
 | 
			
		||||
@@ -16,33 +14,14 @@ import envoy.data.LoginCredentials;
 | 
			
		||||
public class HandshakeRejectionEvent extends Event<String> {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if a given password hash was incorrect
 | 
			
		||||
	 * Select this value if a given password hash or user was incorrect.
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String WRONG_PASSWORD = "an incorrect password was entered";
 | 
			
		||||
	public static final String WRONG_PASSWORD_OR_USER = "password or user were entered incorrectly";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if a given {@link LoginCredentials} pointed at a client who
 | 
			
		||||
	 * is already online
 | 
			
		||||
	 * Select this value if the handshake could not be completed for some reason.
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String ALREADY_ONLINE = "user is already online";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if a given {@link LoginCredentials} pointed at a client who
 | 
			
		||||
	 * does not exist
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String USER_DOES_NOT_EXIST = "user does not exist";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if a given {@link LoginCredentials} with
 | 
			
		||||
	 * {@link LoginCredentials#isRegistration()}==true points at an already existing
 | 
			
		||||
	 * user
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String USER_EXISTS_ALREADY = "user can not be created as he already exists";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Select this value if an unknown error occurred
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String UNKNOWN_REASON = "cause of failure is unknown";
 | 
			
		||||
	public static final String INTERNAL_ERROR = "the process could not be finished as an internal error occurred";
 | 
			
		||||
 | 
			
		||||
	private static final long serialVersionUID = 0L;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -31,5 +31,4 @@ class UserTest {
 | 
			
		||||
		var		deserializedUser	= SerializationUtils.read(serializedUser, User.class);
 | 
			
		||||
		assertEquals(user.getContacts(), deserializedUser.getContacts());
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user