Skip to content

Releases

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 23:07

Migrating from 0.12

1.0.0 freezes the API, and it does so in one release: every form it replaces is removed outright, with
no deprecated bridge and no transitional release in which both work. This section is the whole route
from 0.12.0, name by name; the sections after it give the detail of each change.

The runtime owns its state. Nothing is process-wide any more: each AltsRuntime builds its own
stores, transport and executor.

0.12 1.0
AltStore.accounts(), AltStore.addAccount(a), and every other AltStore call the same call on alts.store() (an AccountStore)
every SecretStore call the same call on alts.secrets() (a HostSecrets)
AltStore.bind, configure, keyProvider, writeDelay, and the same on SecretStore none: the builder sets the directory, file names, key bindings and key provider, and a runtime always coalesces writes (100 ms)
AltStore.DEFAULT_WRITE_DELAY none
HttpUtil (and bind), IoExecutor none: set proxyProvider and executor on the builder
AltsToasts.success, failure, info, removed alts.toasts().toast(level, title, description, durationMs) (see Removed for each mapping)
AccountServices.of(...) alts.accountServices(account) or alts.accountServices(token, uuid)
ProfileLookupService.create(...) alts.profileLookup(); another base with Builder#accountEndpoints
new SkinAvatarCache<>(...) alts.skinCache()
new UrlTemplateAvatarSource(t) passed to avatarSource Builder#avatarUrlTemplate(t)
new MojangAvatarSource(...) nothing: it is the default
new AsyncCache<>(loader, ...) new AsyncCache<>(executor, loader, ...)
new NtpTimeSource(...) new NtpTimeSource(executor, ...)
a runtime left open for the process close it (try (AltsRuntime<H> alts = ...) or alts.close()); a shutdown hook still flushes if you do not

One error model. Every failure is an AltsFailure, thrown as an AltsException where it is not
part of a result. The Error kinds table below maps every former constant to its kind.

0.12 1.0
AltLoginCallback.LoginResult auth.LoginResult(account, failure)
AltLoginCallback, AltLoginCallback.FailureReason none; result.reason() becomes result.failure().map(AltsFailure::kind)
LoginResult.retryAfter(), xstsError() failure().flatMap(AltsFailure::retryAfter), failure().flatMap(AltsFailure::xstsError)
LoginResult.failure(String), failure(String, FailureReason, ...), rateLimited() LoginResult.failure(AltsFailure), LoginResult.failure(Kind, String)
AccountStatus.reason(), rateLimited(), retryAfter() AccountStatus.failure(); state() is unchanged
catch (AccountException e) and e.status(), tokenRefused(), rateLimited(), notFound(), retryAfter() catch (AltsException e) and e.kind(), e.failure().retryAfter()
SkinValidationException and its Reason SkinService.validate(bytes) returning a SkinProblem (same constants); an upload throws AltsException of kind INVALID_INPUT
CryptoException, VaultException AltsException of kind CRYPTO, INVALID_INPUT or PROTOCOL
CookieFile.read's IOException AltsException of kind INVALID_INPUT
PlayerCertificate.privateKey(), publicKey() throwing GeneralSecurityException the same calls, throwing AltsException: INVALID_INPUT for an absent or non-Base64 PEM, CRYPTO for one that decodes to no RSA key; drop the catch (GeneralSecurityException e)
NameChangeResult and ProfileCreationResult outcomes NOT_ENTITLED, UNAUTHORIZED, RATE_LIMITED FAILED, with the kind on failure()
ClaimResult.StopReason.RATE_LIMITED, UNKNOWN; ClaimResult.rateLimited() TERMINAL_FAILURE, with the kind on failure()
new ClaimResult(claimed, attempts, finalResult), new ClaimResult(claimed, attempts, finalResult, stopReason) new ClaimResult(claimed, attempts, finalResult, stopReason, failure)
BulkEntryResult.reason() BulkEntryResult.failure()
BulkEntryResult.failure(index, label, FailureReason, message, attempts) BulkEntryResult.failure(index, label, AltsFailure, attempts)
store loadError(), saveError(), loadWarning() strings Optional<AltsFailure> of kind STORAGE

Value types that may grow are classes. Six records of 0.12 are final classes (and the new
AltsFailure is one too), so a later field is an addition and not a break. Accessors,
equals/hashCode over the same fields, the redacted toString where there was one, and every withX
method are unchanged; the public canonical constructors are gone, and so are deconstruction patterns
over them.

0.12 1.0
new AltAccount(uuid, username, accessToken, type, lastUsed, lastUsedBy, bans, sourceClient, sourceUser, refreshToken, expiresAt) AltAccount.builder(uuid, username, accessToken, type).lastUsed(..).lastUsedBy(..).bans(..).sourceClient(..).sourceUser(..).refreshToken(..).expiresAt(..).build() (each setter optional), or account.toBuilder() to change several fields; the store file format is unchanged
new MicrosoftAuthConfig(...) (thirteen or eleven arguments) MicrosoftAuthConfig.of(clientId) or legacyMsa(clientId), then withScope, withRedirectPath, withEndpoints, withDeviceCodeEndpoints, and the new withRedirectUri and withRpsTicketPrefix
new NetworkScope(purpose, uuid, username), new NetworkScope(purpose, uuid, username, routeTag) NetworkScope.of(purpose) or NetworkScope.forAccount(purpose, uuid, username), then withRouteTag(tag)
new BulkOptions(concurrency, minSpacing, maxRetries, retryBaseDelay, stopOnRateLimit) BulkOptions.of(concurrency, minSpacing, maxRetries, retryBaseDelay, stopOnRateLimit), or BulkOptions.defaults() and the withX methods; a route tag with withRouteTag(tag)
new ClaimOptions(leadTime, window, attemptSpacing, concurrency, timeSource) ClaimOptions.of(leadTime, window, attemptSpacing, concurrency, timeSource), or ClaimOptions.defaults() and withTimeSource
new BulkEntryResult(...) BulkEntryResult.success(index, account, message, attempts), success(index, account, entitlements, message, attempts) or failure(index, label, failure, attempts)

The shared vault: 0.4 to AVP 0.5. 1.0 writes AVP 0.5 only, which is not wire compatible with 0.4
and specifies no upgrade. A repository moves in five steps:

  1. Get the repository's manifest and envelope JSON: export them while the host still runs 0.12, or
    fetch them from the 0.4 server with your own HTTP client, authenticating with
    VaultIdentity.signChallenge.
  2. Read them with LegacyVaultReader.read(manifestJson, envelopeJson, identity), which returns the
    accounts and writes nothing. Review them: 0.4 signed nothing, and the import has no rollback floor.
  3. The owner creates a new repository: OwnerIdentity.generate() (keep its entropy in
    HostSecrets, or have the owner write the phrase down), alts.vault().connectFirstContact(host)
    and then SharedVault.create(host, owner), and puts the accounts they choose.
  4. Each member joins again: the joiner calls SharedVault.prepareJoin with the repo locator the
    owner sent and returns the invite token, the owner calls invite, and the joiner calls join.
  5. Persist each copy's VaultSnapshot (toJson(), encrypted, for example in HostSecrets) and
    resume with SharedVault.resume on the next run.
0.12 1.0
SharedVault's 0.4 constructors and createRepo, openRepo, addMember, encryptPayload, decryptPayload, rotateKey, removeMember SharedVault.create, open, prepareJoin, join, resume, then accounts, update, put, removeAccount, invite, removeMember, sync and the rest
KeyBindingVerifier, IssuerSignedKeyBindingVerifier none: the owner-signed chain and invite tokens replace key binding
RepoPin, RepoContext the pin lives in VaultSnapshot
MemberPublicKey (a prospective member's two public keys, passed to addMember, rotateKey, removeMember) none: a joiner's keys reach the owner inside the InviteToken it returns from SharedVault.prepareJoin, and the roster lists members as VaultMembers (roster(), removeMember(member))
VaultTransport and the vault.transport DTOs none: alts.vault() speaks AVP 0.5 over the runtime's transport
vault.federation.RepoAddress, InviteRequest, RepoLocator vault.RepoLocator, vault.InviteToken
VaultTransportResolver, Builder#vaultTransportResolver, AltsRuntime.vaultTransportResolver() alts.vault(), and Builder#vaultHostAddress to map a host locator to a URL
crypto.VaultIdentity, crypto.WrappedIdentity, crypto.RecoveryCode the same types in lol.trq.alts.vault (change the import; a stored identity still opens)
VaultIdentity.keyAgreementPrivateKey(), RecoveryCode.deriveKey none: the library unwraps inside itself
crypto.KeyWrapScheme, X25519HkdfAesGcmKeyWrap, RepoDataKey, WrappedKey, Hkdf none

Moved or removed packages. The crypto package is gone: its primitives are internal, and the
identity types are in vault (above). The format package and AltManagerFormatting are removed (the
code to copy is under Removed). The implementation (HttpUtil's successor HttpTransport,
FailureText, MicrosoftAuthUtil, CookieAuthUtil, AccountNetworkUtil, TokenExpiry,
MinecraftProfile, the *Impl classes, EncryptionUtil, MicrosoftCallbackServer, ...) is under
lol.trq.alts.internal, outside the API; the table under Removed says what a host uses instead of each.

The build and the module.

  • Gson is an ordinary api dependency now and arrives transitively; a host no longer has to put it on
    its runtime class path. One that ships its own ...
Read more

v0.12.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 14:09

Device-code login, a wider account surface, a host-supplied store key, and a hardening pass over the
transport, the stores, the sign-in routes and the shared vault. Several defaults changed on the way, so
read the upgrade notes first.

Upgrading

Every item here is a break or a change in behaviour that a host has to act on or at least know about.

  • Dependency coordinate. The repository moved to the trq-lol organisation and JitPack coordinates
    follow the repository owner, so the dependency is now com.github.trq-lol:lol.trq.alts, with the
    release tag as the version. The previous coordinate serves releases up to 0.11.1 only.
  • Removed API. AccountNetworkUtil.fetchProfileFromToken(String) and
    fetchProfileFromToken(String, String), deprecated since 0.8.0, are removed. Use
    fetchProfile(token, profileUrl, scope), which returns the status alongside the identity.
  • Records that gained components. LoginResult (xstsError, retryAfter), MicrosoftAuthConfig
    (deviceCodeUrl, deviceTokenUrl), ClaimResult (stopReason), NameEligibility (changedAt) and
    BulkEntryResult (entitlements). Each keeps a constructor with its previous arity, so
    new LoginResult(...) and the like still compile. A record deconstruction pattern does not: add the
    new components to it.
  • New FailureReason constants. RATE_LIMITED, XBOX_DENIED, DECLINED and TIMED_OUT. A switch
    expression over the enum with no default stops compiling until it handles them; a switch statement
    compiles and silently skips them. AccountStatus.State.NOT_ENTITLED now also covers XBOX_DENIED.
  • A rate limit is RATE_LIMITED, not NETWORK. A 429 from any step of a login, check, refresh or
    import used to be reported as NETWORK. Code that retries on NETWORK no longer retries a throttle,
    and should wait for LoginResult.retryAfter() or AccountStatus.retryAfter() when one is stated.
    AccountStatus.state() is still UNREACHABLE for it, and rateLimited() is true with or without a
    stated wait. In bulk(), stopOnRateLimit now also stops on a 429 that names no wait.
  • Sign-in failures are classified. loginMicrosoft used to report every failure as UNKNOWN and
    loginCookieFile every failure as INVALID_TOKEN. Both now report NETWORK, RATE_LIMITED,
    INVALID_TOKEN, NOT_ENTITLED, XBOX_DENIED, DECLINED or TIMED_OUT as the case is. A handler
    that treated UNKNOWN as "the Microsoft login failed" needs a default branch.
  • Store key provider. Builder.storeKeyProvider(...) is optional. Once one is installed, a store
    file opens under the host's key or is reported unreadable. A store written under the machine-derived
    default does not load under a provider unless Builder.migrateFromMachineKey(true) is set. Set it on
    the one launch that first installs the provider over existing files: that launch loads the old store,
    rewrites it under the host's key, and reseals or removes the rolling backup and every unreadable copy.
    Leave it off afterwards, because while it is on the machine-derived key is still accepted. When the
    provider throws, or returns null or fewer than StoreKeyProvider.MIN_LENGTH (16) bytes, the store
    is unreadable and every write is refused until a later AltStore.load() / SecretStore.load()
    succeeds; saveError() says so. AltStore.keyProvider(null), SecretStore.keyProvider(null) and a
    second runtime built without a provider never remove an installed one.
  • Unreadable copies are named differently. A store file that could not be read is copied to
    <name>.unreadable.<time> (epoch milliseconds) before a write replaces it, one copy per distinct
    file, newest five kept. It used to be a single <name>.unreadable, made once. A host or a support
    script that looks for the old name should match the prefix.
  • HttpUtil.bind(null) no longer clears a proxy provider. Neither does building a second runtime
    with no proxyProvider. There is no public call that removes an installed provider.
  • Blocking work left the common pool. Every request, and everything that waits on one, now runs on
    the library executor (IoExecutor.executor()): one virtual thread per task by default, or the
    executor passed to Builder.executor(...). Continuations a host chains without an executor,
    AsyncCache loaders, GameStatsSource.fetch, AvatarSource and DeviceCodePrompt.show run there
    rather than on ForkJoinPool.commonPool(). A host that relied on common-pool threads, their names or
    their thread-locals should supply its own executor.
  • Store writes are coalesced. A runtime built through AltsRuntime.Builder writes each store on a
    background daemon thread 100 ms (AltStore.DEFAULT_WRITE_DELAY) after a mutation, so a mutation is
    not yet on disk when the call returns. AltStore.save(), AltStore.flush() and
    SecretStore.flush() write at once, and a shutdown hook flushes on a normal exit. Call flush()
    before leaving by a route that skips shutdown hooks. AltStore.writeDelay(Duration.ZERO) after
    build() restores synchronous writes; a store bound directly, without the builder, stays synchronous.
  • Deprecated SharedVault entry points. The one-argument constructor SharedVault(KeyWrapScheme)
    is deprecated because it installs KeyBindingVerifier.trustTransport() without being asked; use
    SharedVault(KeyWrapScheme, KeyBindingVerifier) and choose the verifier. addMember(ctx, member),
    rotateKey(ctx, alts, List<MemberPublicKey>) and removeMember(ctx, alts, List<MemberPublicKey>)
    are deprecated in favour of addMember(ctx, member, keyBindingSig),
    rotateKey(ctx, alts, manifest) and removeMember(ctx, alts, manifest, removedMemberId). The
    deprecated forms run the verifier with no signature, so they fail under a verifier that requires one.
    The new forms throw the checked VaultException.
  • SharedVault refuses more. openRepo rejects a manifest whose scheme id is not the configured
    scheme or whose member entry names a different key epoch, decryptPayload rejects an envelope from
    another epoch, and malformed envelopes, payloads and missing transport objects fail with
    VaultException instead of an unchecked exception. RepoAddress and RepoLocator.decode reject
    userinfo, whitespace, and path, query or fragment characters in the host.
  • AsyncCache behaviour. The cache is bounded (DEFAULT_MAX_ENTRIES, 4096; entries read longest
    ago go first). A failed fetch is retried after a growing backoff, where it used to stay failed until
    invalidate. A failed refresh keeps the stale value. The loader runs on the library executor.
  • NtpTimeSource.now() no longer measures inline. It returns the OS clock plus the last measured
    offset and never touches the network, so before the first measurement lands it is the uncorrected OS
    clock. Call the blocking sync() first when the correction has to be in hand. A reply is accepted
    only as a server-mode answer from a synchronised server that echoes the request's nonce.
  • Skin uploads are validated locally. SkinService.upload throws SkinValidationException (an
    AccountException) before any request for data that is empty, larger than
    SkinService.MAX_SKIN_BYTES (1 MiB), not a PNG, or not 64x64 or 64x32.
  • Cookie login uses live.com cookies only. Cookies an export attributes to any other domain are
    dropped, cookies are attached only to HTTPS hosts their domain covers, and the chain stops on a hop
    that is not HTTPS. An export that holds no live.com cookies fails the login.
  • Session-token login confirms the identity before storing. With LoginMode.ADD the token always
    goes through the profile lookup, so adding a session token costs a request and can fail as NETWORK
    or RATE_LIMITED.
  • Request headers. HttpUtil refuses a header name or value holding a control character with an
    IllegalArgumentException whose message quotes nothing, and reads at most 1 MiB of a JSON or text
    body. Failure messages no longer repeat a transport exception's own message.

Added

  • Device-code login. AltLoginService.loginDeviceCode(prompt, mode) runs the OAuth
    device-authorization grant: the host shows a short code and the verification address through the new
    spi/DeviceCodePrompt seam, and the library polls until the sign-in is approved, declined or expired.
    It needs no loopback port and no local browser. Polling honours the advertised interval (held to
    between 1 and 60 seconds), adds five seconds on slow_down, tolerates a few unanswered polls, and
    stops at the advertised expiry (held to 30 minutes). Cancelling the returned future stops it.
    MicrosoftAuthConfig gains deviceCodeUrl and deviceTokenUrl, defaulting to the consumers tenant,
    and withDeviceCodeEndpoints(...).
  • PKCE on the browser login. Every loginMicrosoft generates a code verifier, sends its S256
    challenge on the authorize URL and the verifier on the token exchange.
  • Typed sign-in failures. FailureReason.RATE_LIMITED, XBOX_DENIED, DECLINED and TIMED_OUT;
    LoginResult.xstsError() carrying the decoded Xbox Live refusal; LoginResult.retryAfter() and
    rateLimited(); and MicrosoftAuthUtil.AuthFlowException, the typed failure each step of the chain
    raises.
  • Account services. On alts.accountServices(account):
    • attributes(): PlayerAttributesService reads privileges, preferences and platform ban status
      (PlayerAttributes), and sets the profanity filter. Unknown fields are ignored and unknown ban
      scopes are kept.
    • certificates(): CertificateService requests the chat-signing key pair (PlayerCertificate),
      which decodes to java.security keys, reports expiry, and redacts the private key from toString.
      Nothing is persisted.
    • blocklist(): BlocklistService reads the players the account has blocked.
    • `profile()....
Read more

v0.11.1

Choose a tag to compare

@github-actions github-actions released this 12 Oct 02:18

Fixed

  • Cookie login works again. The sign-in chain it follows grew a step: the Xbox Live sign-in endpoint
    now hands off to the Microsoft identity platform before login.live.com, so the chain is four
    redirects long rather than three. The library stopped one short and read the token out of a URL that
    carried only the code it is traded for, and every cookie login failed with
    Invalid redirect: No accessToken. The chain is now followed to its end, and the cookies are sent
    only to the two Microsoft sign-in hosts.
  • The token on that last redirect is percent-decoded and parsed as JSON rather than cut apart as text,
    so an encoded padding character or a reordered field no longer fails a login.

v0.11.0

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 17:55

The full post-login account surface — everything an account owner can do to their own account through
the public Minecraft services. The bulk of the
1.0.0 design, shipped ahead of the freeze so the
freeze itself, and the one sensitive route it holds back, are a decision made deliberately rather than
in passing.

Added

  • A new account/ package, reached as alts.accountServices(account). Focused single-job services
    built over one live token, each holdable on its own, none of which install a session or touch the
    store:
    • ProfileService — the full profile read (PlayerProfile): name, UUID, skins, capes, and pending
      profileActions. The slim name-and-UUID read the auth chain does stays internal.
    • EntitlementService — Entitlements, the product set rather than a boolean, with
      ownsJava() / ownsJavaOutright() / viaGamePass() / ownsBedrock(). An account that owns Java is
      told from one entitled only through a Game Pass that can lapse — the distinction an alt manager cares
      about and a boolean throws away.
    • NameService — checkAvailability, eligibility (whether a change is allowed now, and the
      account's creation time), change (classified: a 400 invalid name told from a 403 cooldown from a
      404 no-entitlement, error body read for the reason), and claimAt — a scheduled claim that fires a
      bounded burst of change attempts around a target instant and stops on the first success.
    • SkinService — set from a URL, upload from bytes, reset, with the classic/slim model.
    • CapeService — show a cape, hide it, list owned.
  • A new time/ package — TimeSource (the corrected-clock seam the scheduled claim reads),
    SystemTimeSource (default), and NtpTimeSource (a minimal one-round-trip SNTP client, for a claim
    that needs the sub-second edge). The claim's drop time is an input a host reads off wherever names are
    listed; the library claims at the time it is given and does not monitor for one.
  • XstsError — the Xbox XErr codes decoded (NO_XBOX_ACCOUNT, REGION_BLOCKED,
    ADULT_VERIFICATION_REQUIRED, CHILD_ACCOUNT, …). A MicrosoftAuthUtil.XstsAuthException carries the
    classified reason, so an account that just needs a one-time Xbox sign-in stops surfacing as a bare
    "Xbox auth failed".
  • net/Multipart (the skin upload's body) and HttpUtil.sendForStatus / postJsonForStatus (the
    PUT/DELETE and status-returning JSON the account mutations need).

Notes

The account services are additive — a host that does not call accountServices(...) is unaffected, and
nothing in the existing surface changed shape. The one thing that turned out cleaner than the design
record proposed: the full profile is a new PlayerProfile in account/ rather than a widened
MinecraftProfile, so the auth chain's result type is untouched and there is no breaking change to it.

Held back for the 1.0.0 freeze, deliberately: credential (username + password) login, which the design
record flags for an explicit decision; the removal of the deprecated
AccountNetworkUtil.fetchProfileFromToken; and a bulk entitlement sweep. 1.0.0 is where the surface is
frozen and those are settled.

v0.10.0

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 17:32

Identity that stays current — the third milestone of the
alt-management surface.

Added

  • AvatarSource seam and the MojangAvatarSource default. The avatar cache used to fetch from a
    hardcoded third-party head-render URL, which disclosed every account's username to that service on
    every cache miss — for an alt manager, the whole list one person controls, arriving from one address.
    The default now resolves the skin from Mojang's own session server and crops the face locally, so the
    identity is disclosed to no party the host was not already authenticating through.
  • UrlTemplateAvatarSource, the opt-in for a host that wants a head-render service back (its 3D
    renders, its CDN). Installing it is a deliberate trade — that service sees each UUID — rather than the
    default a host gets by doing nothing.
  • AltAccount.withUsername(String), and username correction on check/refresh: the profile lookup
    that validates a token already carries the current name, so a renamed account has its stored username
    updated for free rather than showing the name it was saved under.

Changed

  • Breaking: SkinAvatarCache.get is keyed by UUID, not username. A username is a mutable display
    attribute, so a username-keyed cache breaks a renamed account's head permanently — the old name stops
    resolving. Pass account.uuid() where you passed account.username().
  • Breaking: the default avatar source changed from the third-party service to Mojang. A host that
    wants the old behaviour installs UrlTemplateAvatarSource with its URL template. No API change beyond
    the key, but the faces now come from elsewhere.
  • Breaking: SkinAvatarCache's constructor takes an AvatarSource first. Hosts using AltsRuntime
    are unaffected; only direct construction of the cache changes.

Fixed

  • A failed avatar fetch is retried after a growing backoff instead of being cached as failed for the life
    of the process. One network blip used to cost the head until restart.
  • The avatar fetch no longer downloads without a size cap, and it routes through the proxy seam like
    every other request (both carried over from the 0.8.0 transport unification, now exercised by the new
    source).

v0.9.0

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 14:50

Bulk operations (breaking).

alts.bulk() runs checkAll, refreshAll, or importCredentials over many accounts with bounded concurrency, spacing between starts, a retry budget that only retries transient failures, per-entry progress, and cancellation. None of them install a session.

The report separates cancelled from stopped early from ran and some failed — three outcomes that call for three different things being said to the user. stopOnRateLimit defaults to on, because continuing to send to a service that has asked to be left alone is how an address earns a longer ban than the one it is already serving. Result labels are usernames, or positional (entry 4), and never the input line, because that line is a credential and results are what a host logs.

CredentialKind.detect(String) is public so a paste can be previewed, and refuses to guess: anything it cannot place fails that entry.

Breaking. AccountStatus and AccountNetworkUtil.ProfileLookup each gain a trailing retryAfter component.

Full notes in CHANGELOG.md.

v0.8.0

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 14:50

Per-account request routing, and operating on an account without logging into it (breaking).

Proxies. spi/ProxyProvider names the route each request takes, asked per request with a NetworkScope carrying the purpose and the account it is for — which is what makes one proxy per alt possible. Resolution fails closed: a provider that throws or names no route fails the request rather than falling back to a direct connection, because a silent fallback discloses the real address at exactly the moment the host believed it was covered. Authenticated SOCKS5 is refused rather than silently downgraded.

Account operations. alts.accountService() adds check (validate, change nothing) and refresh (validate and renew, persisting the rotation). Neither installs a session, so a sweep over every stored alt no longer switches session once per account. loginAccount is now refresh plus the injection.

Entitlement. An account that authenticates but has no Minecraft profile reports NOT_ENTITLED instead of "invalid token", from every route.

Breaking. HttpUtil.HttpResponse gains retryAfter; FailureReason gains NOT_ENTITLED; AccountNetworkUtil.fetchProfileFromToken is deprecated in favour of fetchProfile.

Full notes in CHANGELOG.md.

v0.7.0

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 14:50

A login route, a second Microsoft dialect, and a durability pass over the local stores after a full audit of the library.

Added. loginCookieFile(Path, LoginMode) reads an exported cookie file — Netscape or the JSON the common cookie-editor extensions write, byte-order-mark aware and size-capped. MicrosoftAuthConfig.legacyMsa(...) speaks the pre-Azure MSA dialect, so a credential minted by one of those applications can be redeemed at all.

Fixed. A store that failed to load was indistinguishable from an empty one, and the next save wrote that empty list straight over the file — every stored account gone, for something as ordinary as a renamed OS user. The stores were also unsafe to touch off-thread, the session route reported an outage as a refused token, and the OAuth state could fall back to a guessable value when SecureRandom.getInstanceStrong() failed.

Breaking. MicrosoftAuthConfig gains redirectUri and rpsTicketPrefix; both default to the previous behaviour, so only positional construction breaks.

Full notes in CHANGELOG.md.

v0.6.2

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 14:50

loginRefreshToken now sanitises the token it is given.

Refresh tokens are pasted, and they are routinely pasted out of account lists that prefix them with a name (name:token), out of an Authorization header, or out of a quoted config value. In a password-style input the stray prefix is invisible, so it went to the token endpoint as part of the credential and came back as an invalid grant — indistinguishable, to the user, from a genuinely dead token.

Full notes in CHANGELOG.md.

v0.6.1

Choose a tag to compare

@trqlmao trqlmao released this 06 Aug 14:50

Adds AltsRuntime.Builder.vaultTransportResolver(...) and the matching accessor.

The VaultTransportResolver seam shipped in an earlier release with no way to install one, so it was unreachable: a host could implement the interface but never hand it to the runtime, leaving federated avp://host/repoId repositories resolvable in principle and unusable in practice. The wiring existed only on an unmerged branch, which consumers were pinning to directly.

Full notes in CHANGELOG.md.