Contents
Class EncryptedAuthCredentialStore
java.lang.Object
com.hypixel.hytale.server.core.auth.EncryptedAuthCredentialStore
- All Implemented Interfaces:
IAuthCredentialStore
Credential store that persists to an AES-256-GCM encrypted file.
The encryption key is derived via PBKDF2 from available passphrase sources.
Write priority (first available is used to encrypt new data):
HYTALE_AUTH_KEY_FILEenv var — path to a file containing the passphraseHYTALE_AUTH_KEYenv var — passphrase provided directly- Machine hardware UUID — makes credentials machine-bound (default)
- Auto-generated key file (
auth.key) — created when no other source is available
HYTALE_AUTH_KEY_FILE/HYTALE_AUTH_KEYenv vars- Auto-generated key file (
auth.key) — if present on disk, tried before hardware UUID to handle environments where machine identity is unstable - Machine hardware UUID
If an env var is explicitly set but its value cannot be used (unreadable file, empty file),
construction fails with IllegalStateException. Encrypting with an unintended key
would silently orphan credentials.
-
Nested Class Summary
Nested classes/interfaces inherited from interface IAuthCredentialStore
IAuthCredentialStore.OAuthTokens -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static PathkeyFilePath(Path credentialPath) voidsetProfile(UUID uuid) void
-
Constructor Details
-
EncryptedAuthCredentialStore
-
-
Method Details
-
keyFilePath
-
setTokens
- Specified by:
setTokensin interfaceIAuthCredentialStore
-
getTokens
- Specified by:
getTokensin interfaceIAuthCredentialStore
-
setProfile
- Specified by:
setProfilein interfaceIAuthCredentialStore
-
getProfile
- Specified by:
getProfilein interfaceIAuthCredentialStore
-
clear
public void clear()- Specified by:
clearin interfaceIAuthCredentialStore
-