abstract class HandshakeHandler extends GenericConnectionPacketHandler
Class HandshakeHandler. Provides handshakehandler functionality for the Hytale server.
java.lang.Object > GenericConnectionPacketHandler > HandshakeHandler
Field Summary
authTimeout
Field authTimeout.
identityClaims
Field identityClaims.
tokenUuid
Field tokenUuid.
requiredScope
Field requiredScope.
serverSessionToken
Field serverSessionToken.
serverIdentityToken
Field serverIdentityToken.
finalServerIdentityToken
Field finalServerIdentityToken.
accessToken
Field accessToken.
serverAuthGrant
Field serverAuthGrant.
clientCert
Field clientCert.
claims
Field claims.
tokenUsername
Field tokenUsername.
serverAuthManager
Field serverAuthManager.
serverCertFingerprint
Field serverCertFingerprint.
passwordChallenge
Field passwordChallenge.
passwordChallenge2
Field passwordChallenge2.
password
Field password.
ownerUuid
Field ownerUuid.
challenge
Field challenge.
Method Detail
HandshakeHandler
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 Channelchannel@Nonnull final ProtocolVersionprotocolVersion@Nonnull final Stringlanguage@Nonnull final ClientTypeclientType@Nonnull final StringidentityToken@Nonnull final UUIDplayerUuid@Nonnull final Stringusername@Nullable final byte[]referralData@Nullable final HostAddressreferralSource
getSessionServiceClient
Method getSessionServiceClient.
JWTValidator
new
JWTValidator
(getSessionServiceClient()
Method JWTValidator.
- Parameters:
getSessionServiceClient(getSessionServiceClient(
ReadTimeoutHandler
new
ReadTimeoutHandler
(authTimeout.toMillis()
Method ReadTimeoutHandler.
- Parameters:
authTimeout.toMillis(authTimeout.toMillis(
requestAuthGrant
void
requestAuthGrant
()
Method requestAuthGrant.
AuthGrant
new
AuthGrant
(authGrant, finalServerIdentityToken)
Method AuthGrant.
- Parameters:
authGrantauthGrantfinalServerIdentityTokenfinalServerIdentityToken
JWT
validating
JWT
(mTLS cert present: %s, server auth grant: %s)
Method JWT.
- Parameters:
server auth grant:%s
exchangeServerAuthGrant
void
exchangeServerAuthGrant
(@Nonnull final String serverAuthGrant)
Method exchangeServerAuthGrant.
- Parameters:
@Nonnull final StringserverAuthGrant
token
session
token
(first 20 chars)
Method token.
- Parameters:
first 20chars
if
else
if
(serverAccessToken == null)
Method if.
- Parameters:
serverAccessToken ==null
ServerAuthToken
new
ServerAuthToken
(serverAccessToken, passwordChallenge)
Method ServerAuthToken.
- Parameters:
serverAccessTokenserverAccessTokenpasswordChallengepasswordChallenge
generatePasswordChallengeIfNeeded
byte[]
generatePasswordChallengeIfNeeded
()
Method generatePasswordChallengeIfNeeded.
SecureRandom
new
SecureRandom
()
Method SecureRandom.
completeAuthentication
void
completeAuthentication
(final byte[] passwordChallenge)
Method completeAuthentication.
- Parameters:
final byte[]passwordChallenge