public class ServerAuthManager
Class ServerAuthManager. Provides serverauthmanager functionality for the Hytale server.
java.lang.Object > ServerAuthManager
Field Summary
oauthClient
Field oauthClient.
refreshTask
Field refreshTask.
cancelActiveFlow
Field cancelActiveFlow.
t
Field t.
optionSet
Field optionSet.
ownerProfile
Field ownerProfile.
envToken
Field envToken.
session
Field session.
provider
Field provider.
store
Field store.
tokens
Field tokens.
result
Field result.
cert
Field cert.
oldStore
Field oldStore.
newStore
Field newStore.
profile
Field profile.
accessToken
Field accessToken.
profiles
Field profiles.
profile2
Field profile2.
expiresAt
Field expiresAt.
refreshToken
Field refreshToken.
newTokens
Field newTokens.
requestedUuid
Field requestedUuid.
profileUuid
Field profileUuid.
newSession
Field newSession.
expiresAtInstant
Field expiresAtInstant.
secondsUntilExpiry
Field secondsUntilExpiry.
mode
Field mode.
selected
Field selected.
validator
Field validator.
claims
Field claims.
claims2
Field claims2.
expiry
Field expiry.
idToken
Field idToken.
parts
Field parts.
payload
Field payload.
json
Field json.
exp
Field exp.
secondsUntilExpiry2
Field secondsUntilExpiry2.
refreshDelay
Field refreshDelay.
currentSessionToken
Field currentSessionToken.
response
Field response.
supported
Field supported.
currentProfile
Field currentProfile.
sb
Field sb.
secondsRemaining
Field secondsRemaining.
Method Detail
ServerAuthManager
private
ServerAuthManager
()
Method ServerAuthManager.
DefaultAuthCredentialStore
new
DefaultAuthCredentialStore
()
Method DefaultAuthCredentialStore.
initialize
void
initialize
()
Method initialize.
initializeCredentialStore
void
initializeCredentialStore
()
Method initializeCredentialStore.
if
else
if
(result == AuthResult.PENDING_PROFILE_SELECTION)
Method if.
- Parameters:
result ==AuthResult.PENDING_PROFILE_SELECTION
getGameSession
SessionServiceClient.GameSessionResponse
getGameSession
()
Method getGameSession.
getIdentityToken
String
getIdentityToken
()
Method getIdentityToken.
getSessionToken
String
getSessionToken
()
Method getSessionToken.
setGameSession
void
setGameSession
(@Nonnull final SessionServiceClient.GameSessionResponse session)
Method setGameSession.
- Parameters:
@Nonnull final SessionServiceClient.GameSessionResponsesession
hasIdentityToken
boolean
hasIdentityToken
()
Method hasIdentityToken.
hasSessionToken
boolean
hasSessionToken
()
Method hasSessionToken.
setServerCertificate
void
setServerCertificate
(@Nonnull final X509Certificate certificate)
Method setServerCertificate.
- Parameters:
@Nonnull final X509Certificatecertificate
getServerCertificate
X509Certificate
getServerCertificate
()
Method getServerCertificate.
getServerCertificateFingerprint
String
getServerCertificateFingerprint
()
Method getServerCertificateFingerprint.
getServerSessionId
UUID
getServerSessionId
()
Method getServerSessionId.
registerCredentialStore
Method registerCredentialStore.
- Parameters:
final IAuthCredentialStorestore
swapCredentialStoreProvider
Method swapCredentialStoreProvider.
- Parameters:
@Nonnull final AuthCredentialStoreProviderprovider
createGameSessionFromOAuth
AuthResult
createGameSessionFromOAuth
(final AuthMode mode)
Method createGameSessionFromOAuth.
- Parameters:
final AuthModemode
refreshOAuthTokens
boolean
refreshOAuthTokens
()
Method refreshOAuthTokens.
tryAutoSelectProfile
SessionServiceClient.GameProfile
tryAutoSelectProfile
(final SessionServiceClient.GameProfile[] profiles)
Method tryAutoSelectProfile.
- Parameters:
final SessionServiceClient.GameProfile[]profiles
completeAuthWithProfile
boolean
completeAuthWithProfile
(final SessionServiceClient.GameProfile profile, final AuthMode mode)
Method completeAuthWithProfile.
- Parameters:
final SessionServiceClient.GameProfileprofilefinal AuthModemode
getPendingProfiles
SessionServiceClient.GameProfile[]
getPendingProfiles
()
Method getPendingProfiles.
hasPendingProfiles
boolean
hasPendingProfiles
()
Method hasPendingProfiles.
selectPendingProfile
boolean
selectPendingProfile
(final int index)
Method selectPendingProfile.
- Parameters:
final intindex
selectPendingProfileByUsername
boolean
selectPendingProfileByUsername
(final String username)
Method selectPendingProfileByUsername.
- Parameters:
final Stringusername
clearPendingProfiles
void
clearPendingProfiles
()
Method clearPendingProfiles.
cancelActiveFlow
boolean
cancelActiveFlow
()
Method cancelActiveFlow.
validateInitialTokens
boolean
validateInitialTokens
(@Nullable final String sessionToken, @Nullable final String identityToken)
Method validateInitialTokens.
- Parameters:
@Nullable final StringsessionToken@Nullable final StringidentityToken
parseAndScheduleRefresh
void
parseAndScheduleRefresh
()
Method parseAndScheduleRefresh.
String
new
String
(Base64.getUrlDecoder()
Method String.
- Parameters:
Base64.getUrlDecoder(Base64.getUrlDecoder(
scheduleRefresh
void
scheduleRefresh
(final int expiresInSeconds)
Method scheduleRefresh.
- Parameters:
final intexpiresInSeconds
doRefresh
void
doRefresh
()
Method doRefresh.
refreshGameSession
boolean
refreshGameSession
(final String currentSessionToken)
Method refreshGameSession.
- Parameters:
final StringcurrentSessionToken
refreshGameSessionViaOAuth
boolean
refreshGameSessionViaOAuth
()
Method refreshGameSessionViaOAuth.
createGameSession
SessionServiceClient.GameSessionResponse
createGameSession
(final UUID profileUuid)
Method createGameSession.
- Parameters:
final UUIDprofileUuid
logout
void
logout
()
Method logout.
getAuthMode
AuthMode
getAuthMode
()
Method getAuthMode.
isSingleplayer
boolean
isSingleplayer
()
Method isSingleplayer.
isOwner
boolean
isOwner
(@Nullable final UUID playerUuid)
Method isOwner.
- Parameters:
@Nullable final UUIDplayerUuid
getSelectedProfile
SessionServiceClient.GameProfile
getSelectedProfile
()
Method getSelectedProfile.
getTokenExpiry
Instant
getTokenExpiry
()
Method getTokenExpiry.
getAuthStatus
String
getAuthStatus
()
Method getAuthStatus.
shutdown
void
shutdown
()
Method shutdown.