|
RuneHive-Game
|
Represents a Session for authenticating users logging in.
More...
Classes | |
| class | FailedLoginAttempt |
| A data class that represents a failed login attempt. More... | |
Public Member Functions | |
| void | handleClientPacket (Object o) |
| The method that is called when the client sends packets to the server. | |
| void | handleUserLoginDetails (final LoginDetailsPacket packet) |
| LoginSession (Channel channel) | |
| Public Member Functions inherited from com.runehive.net.session.Session | |
| final void | close () |
| The method to close this session. | |
| Channel | getChannel () |
Gets the underlying Channel for this Session. | |
| String | getHost () |
| Gets the users host address. | |
| Session (Channel channel) | |
Creates a new Session. | |
Private Member Functions | |
| LoginResponse | authenticatedForumUser (Player player, boolean isEmail) |
| LoginResponse | evaluate (Player player) |
| boolean | isBanned (long unixTime) |
Static Private Member Functions | |
| static void | sendFailedResponse (final Channel channel, final LoginResponse response) |
Static Private Attributes | |
| static final ConcurrentMap< String, FailedLoginAttempt > | failedLogins = new ConcurrentHashMap<>() |
| static final Logger | logger = LoggerFactory.getLogger(LoginSession.class) |
Additional Inherited Members | |
| Protected Member Functions inherited from com.runehive.net.session.Session | |
| void | onClose (ChannelFuture future) |
| The method called after a session has been closed. | |
| Protected Attributes inherited from com.runehive.net.session.Session | |
| final Channel | channel |
| The channel attached to this session. | |
| final String | host |
| The users host address. | |
Represents a Session for authenticating users logging in.
Definition at line 42 of file LoginSession.java.
| com.runehive.net.session.LoginSession.LoginSession | ( | Channel | channel | ) |
Definition at line 48 of file LoginSession.java.
References com.runehive.net.session.Session.channel.
Referenced by handleUserLoginDetails().
|
private |
Definition at line 218 of file LoginSession.java.
References com.runehive.net.codec.login.LoginResponse.ACCOUNT_DISABLED, com.runehive.net.codec.login.LoginResponse.FORUM_REGISTRATION, com.runehive.game.service.ForumService.getConnectionPool(), com.runehive.game.world.entity.mob.player.Player.getPassword(), com.runehive.game.world.entity.mob.player.Player.getUsername(), com.runehive.net.codec.login.LoginResponse.INVALID_CREDENTIALS, isBanned(), com.runehive.net.codec.login.LoginResponse.LOGIN_SERVER_OFFLINE, com.runehive.net.codec.login.LoginResponse.NORMAL, com.runehive.game.world.entity.mob.player.Player.setMemberId(), com.runehive.game.world.entity.mob.player.Player.setPassword(), and com.runehive.game.world.entity.mob.player.Player.setUsername().
Referenced by evaluate().
|
private |
Definition at line 141 of file LoginSession.java.
References com.runehive.net.codec.login.LoginResponse.ACCOUNT_DISABLED, com.runehive.net.codec.login.LoginResponse.ACCOUNT_ONLINE, authenticatedForumUser(), com.runehive.net.codec.login.LoginResponse.BAD_USERNAME, com.runehive.game.world.entity.mob.player.BannedPlayers.bans, com.runehive.content.bot.BotUtility.BOT_NAMES, com.runehive.Config.EMAIL_MAX_CHARACTERS, com.runehive.Config.EMAIL_MIN_CHARACTERS, com.runehive.Config.FORUM_INTEGRATION, com.runehive.game.world.entity.mob.player.Player.getPassword(), com.runehive.game.world.World.getPlayerByHash(), com.runehive.game.world.World.getPlayerCount(), com.runehive.game.world.entity.mob.player.Player.getUsername(), com.runehive.net.codec.login.LoginResponse.INSUFFICIENT_PERMSSION, com.runehive.net.codec.login.LoginResponse.INVALID_CREDENTIALS, com.runehive.net.codec.login.LoginResponse.INVALID_EMAIL, com.runehive.game.world.entity.mob.player.persist.PlayerSerializer.load(), com.runehive.Config.MAX_PLAYERS, com.runehive.util.Utility.nameToLong(), com.runehive.net.codec.login.LoginResponse.NORMAL, com.runehive.game.world.World.search(), com.runehive.game.world.World.searchAll(), com.runehive.net.codec.login.LoginResponse.SERVER_BEING_UPDATED, com.runehive.RuneHive.serverStarted, com.runehive.net.codec.login.LoginResponse.SHORT_USERNAME, com.runehive.game.world.World.update, com.runehive.Config.USERNAME_MAX_CHARACTERS, com.runehive.Config.USERNAME_MIN_CHARACTERS, and com.runehive.net.codec.login.LoginResponse.WORLD_FULL.
Referenced by handleUserLoginDetails().
| void com.runehive.net.session.LoginSession.handleClientPacket | ( | Object | o | ) |
The method that is called when the client sends packets to the server.
| o | The vague object packet. |
Reimplemented from com.runehive.net.session.Session.
Definition at line 53 of file LoginSession.java.
References com.runehive.net.LoginExecutorService.execute(), com.runehive.RuneHive.getInstance(), and com.runehive.RuneHive.getLoginExecutorService().
| void com.runehive.net.session.LoginSession.handleUserLoginDetails | ( | final LoginDetailsPacket | packet | ) |
Definition at line 61 of file LoginSession.java.
References com.runehive.net.session.Session.channel, com.runehive.util.Stopwatch.elapsed(), evaluate(), com.runehive.Config.FAILED_LOGIN_ATTEMPTS, com.runehive.Config.FAILED_LOGIN_TIMEOUT, failedLogins, com.runehive.net.session.LoginSession.FailedLoginAttempt.getAttempt(), com.runehive.game.world.entity.mob.player.Player.getPassword(), com.runehive.net.session.LoginSession.FailedLoginAttempt.getStopwatch(), com.runehive.game.world.entity.mob.player.Player.hostList, com.runehive.net.codec.login.LoginResponse.INVALID_CREDENTIALS, com.runehive.game.world.entity.mob.player.Player.lastHost, logger, com.runehive.net.codec.login.LoginResponse.LOGIN_ATTEMPTS_EXCEEDED, LoginSession(), com.runehive.net.codec.login.LoginResponse.NORMAL, com.runehive.game.world.entity.mob.player.profile.ProfileRepository.put(), com.runehive.game.world.World.queueLogin(), com.runehive.game.world.entity.mob.player.Player.right, sendFailedResponse(), com.runehive.Config.SESSION_KEY, com.runehive.game.world.entity.mob.player.Player.setPassword(), and com.runehive.game.world.entity.mob.player.Player.setSession().
Referenced by com.runehive.net.LoginExecutorService.execute().
|
private |
Definition at line 255 of file LoginSession.java.
Referenced by authenticatedForumUser().
|
staticprivate |
Definition at line 136 of file LoginSession.java.
References com.runehive.net.session.Session.channel.
Referenced by handleUserLoginDetails().
|
staticprivate |
Definition at line 46 of file LoginSession.java.
Referenced by handleUserLoginDetails().
|
staticprivate |
Definition at line 44 of file LoginSession.java.
Referenced by handleUserLoginDetails().