HandshakeHandler

abstract class HandshakeHandler extends GenericConnectionPacketHandler

Class HandshakeHandler. Provides handshakehandler functionality for the Hytale server.

java.lang.Object > GenericConnectionPacketHandler > HandshakeHandler

Field Summary

authTimeout

final Duration authTimeout

Field authTimeout.

identityClaims

final JWTValidator.IdentityTokenClaims identityClaims

Field identityClaims.

tokenUuid

final UUID tokenUuid

Field tokenUuid.

requiredScope

final String requiredScope

Field requiredScope.

serverSessionToken

final String serverSessionToken

Field serverSessionToken.

serverIdentityToken

final String serverIdentityToken

Field serverIdentityToken.

finalServerIdentityToken

final String finalServerIdentityToken

Field finalServerIdentityToken.

accessToken

final String accessToken

Field accessToken.

serverAuthGrant

final String serverAuthGrant

Field serverAuthGrant.

clientCert

final X509Certificate clientCert

Field clientCert.

claims

final JWTValidator.JWTClaims claims

Field claims.

tokenUsername

final String tokenUsername

Field tokenUsername.

serverAuthManager

final ServerAuthManager serverAuthManager

Field serverAuthManager.

serverCertFingerprint

final String serverCertFingerprint

Field serverCertFingerprint.

passwordChallenge

final byte[] passwordChallenge

Field passwordChallenge.

passwordChallenge2

final byte[] passwordChallenge2

Field passwordChallenge2.

password

final String password

Field password.

ownerUuid

final UUID ownerUuid

Field ownerUuid.

challenge

final byte[] challenge

Field challenge.

Method Detail

HandshakeHandler

public public HandshakeHandler (@Nonnull final Channel channel, @Nonnull final ProtocolVersion protocolVersion, @Nonnull final String language, @Nonnull final ClientType clientType, @Nonnull final String identityToken, @Nonnull final UUID playerUuid, @Nonnull final String username, @Nullable final byte[] referralData, @Nullable final HostAddress referralSource)

Method HandshakeHandler.

Parameters:
@Nonnull final Channel channel
@Nonnull final ProtocolVersion protocolVersion
@Nonnull final String language
@Nonnull final ClientType clientType
@Nonnull final String identityToken
@Nonnull final UUID playerUuid
@Nonnull final String username
@Nullable final byte[] referralData
@Nullable final HostAddress referralSource

getSessionServiceClient

static SessionServiceClient getSessionServiceClient ()

Method getSessionServiceClient.

getJwtValidator

static JWTValidator getJwtValidator ()

Method getJwtValidator.

JWTValidator

public new JWTValidator (getSessionServiceClient()

Method JWTValidator.

Parameters:
getSessionServiceClient( getSessionServiceClient(

accept

public void accept (@Nonnull final Packet packet)

Method accept.

Parameters:
@Nonnull final Packet packet

registered0

public void registered0 (final PacketHandler oldHandler)

Method registered0.

Parameters:
final PacketHandler oldHandler

ReadTimeoutHandler

public new ReadTimeoutHandler (authTimeout.toMillis()

Method ReadTimeoutHandler.

Parameters:
authTimeout.toMillis( authTimeout.toMillis(

requestAuthGrant

private void requestAuthGrant ()

Method requestAuthGrant.

AuthGrant

public new AuthGrant (authGrant, finalServerIdentityToken)

Method AuthGrant.

Parameters:
authGrant authGrant
finalServerIdentityToken finalServerIdentityToken

handle

public void handle (@Nonnull final Disconnect packet)

Method handle.

Parameters:
@Nonnull final Disconnect packet

JWT

public validating JWT (mTLS cert present: %s, server auth grant: %s)

Method JWT.

Parameters:
server auth grant: %s

exchangeServerAuthGrant

private void exchangeServerAuthGrant (@Nonnull final String serverAuthGrant)

Method exchangeServerAuthGrant.

Parameters:
@Nonnull final String serverAuthGrant

token

public session token (first 20 chars)

Method token.

Parameters:
first 20 chars

if

public else if (serverAccessToken == null)

Method if.

Parameters:
serverAccessToken == null

ServerAuthToken

public new ServerAuthToken (serverAccessToken, passwordChallenge)

Method ServerAuthToken.

Parameters:
serverAccessToken serverAccessToken
passwordChallenge passwordChallenge

generatePasswordChallengeIfNeeded

private byte[] generatePasswordChallengeIfNeeded ()

Method generatePasswordChallengeIfNeeded.

SecureRandom

public new SecureRandom ()

Method SecureRandom.

completeAuthentication

private void completeAuthentication (final byte[] passwordChallenge)

Method completeAuthentication.

Parameters:
final byte[] passwordChallenge