Class HandshakeHandler
java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler
com.hypixel.hytale.server.core.io.handlers.GenericConnectionPacketHandler
com.hypixel.hytale.server.core.io.handlers.login.HandshakeHandler
- All Implemented Interfaces:
IPacketReceiver
- Direct Known Subclasses:
AuthenticationPacketHandler
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.hypixel.hytale.server.core.io.PacketHandler
PacketHandler.DisconnectReason, PacketHandler.PingInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate Stringprivate HandshakeHandler.AuthStateprivate booleanprivate final ClientTypeprivate final Stringprivate static com.hypixel.hytale.server.core.auth.JWTValidatorprivate static final com.hypixel.hytale.logger.HytaleLoggerprivate final UUIDprivate final byte[]private final HostAddressprivate static final intprivate static SessionServiceClientprivate final StringFields inherited from class com.hypixel.hytale.server.core.io.handlers.GenericConnectionPacketHandler
languageFields inherited from class com.hypixel.hytale.server.core.io.PacketHandler
auth, channel, clientReadyForChunksFuture, clientReadyForChunksFutureStack, disconnectReason, MAX_PACKET_ID, pingIdRandom, pingInfo, protocolVersion, queuedPackets, queuePackets, registered -
Constructor Summary
ConstructorsConstructorDescriptionHandshakeHandler(io.netty.channel.Channel channel, ProtocolVersion protocolVersion, String language, ClientType clientType, String identityToken, UUID playerUuid, String username, byte[] referralData, HostAddress referralSource) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidcompleteAuthentication(byte[] passwordChallenge) private voidexchangeServerAuthGrant(String serverAuthGrant) private byte[]private static com.hypixel.hytale.server.core.auth.JWTValidatorprivate static SessionServiceClientvoidvoidhandle(Disconnect packet) protected abstract voidonAuthenticated(byte[] var1) voidregistered0(PacketHandler oldHandler) private voidMethods inherited from class com.hypixel.hytale.server.core.io.PacketHandler
clearTimeout, closed, disconnect, disconnect0, getAuth, getChannel, getClientReadyForChunksFuture, getDisconnectReason, getIdentifier, getOperationTimeoutThreshold, getPacketStatsRecorder, getPingInfo, getProtocolVersion, getQueuedPacketsCount, handle, handlePong, isCompressionEnabled, isLANConnection, isLocalConnection, logCloseMessage, logConnectionTimings, registered, sendPing, setClientReadyForChunksFuture, setCompressionEnabled, setQueuePackets, setTimeout, stillActive, tickPing, tryFlush, unregistered, unregistered0, write, write, write, writeNoCache, writePacket
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
sessionServiceClient
-
jwtValidator
private static volatile com.hypixel.hytale.server.core.auth.JWTValidator jwtValidator -
authState
-
authTokenPacketReceived
private volatile boolean authTokenPacketReceived -
authenticatedUsername
-
AUTH_GRANT_TIMEOUT_SECONDS
private static final int AUTH_GRANT_TIMEOUT_SECONDS- See Also:
-
AUTH_TOKEN_TIMEOUT_SECONDS
private static final int AUTH_TOKEN_TIMEOUT_SECONDS- See Also:
-
SERVER_TOKEN_EXCHANGE_TIMEOUT_SECONDS
private static final int SERVER_TOKEN_EXCHANGE_TIMEOUT_SECONDS- See Also:
-
clientType
-
identityToken
-
playerUuid
-
username
-
referralData
private final byte[] referralData -
referralSource
-
-
Constructor Details
-
HandshakeHandler
public HandshakeHandler(@Nonnull io.netty.channel.Channel channel, @Nonnull ProtocolVersion protocolVersion, @Nonnull String language, @Nonnull ClientType clientType, @Nonnull String identityToken, @Nonnull UUID playerUuid, @Nonnull String username, @Nullable byte[] referralData, @Nullable HostAddress referralSource)
-
-
Method Details
-
getSessionServiceClient
-
getJwtValidator
private static com.hypixel.hytale.server.core.auth.JWTValidator getJwtValidator() -
accept
- Specified by:
acceptin classPacketHandler
-
registered0
- Overrides:
registered0in classPacketHandler
-
requestAuthGrant
private void requestAuthGrant() -
handle
-
handle
-
exchangeServerAuthGrant
-
generatePasswordChallengeIfNeeded
private byte[] generatePasswordChallengeIfNeeded() -
completeAuthentication
private void completeAuthentication(byte[] passwordChallenge) -
onAuthenticated
protected abstract void onAuthenticated(byte[] var1)
-