Skip to content

세션 저장·Minecraft 인증 JSON에 생성 메타데이터 적용 - #25

Merged
AlphaBs merged 4 commits into
masterfrom
codex/native-aot-json
Oct 18, 2026
Merged

AlphaBs merged 4 commits into
masterfrom
codex/native-aot-json

Conversation

@AlphaBs

@AlphaBs AlphaBs commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Use generated JSON metadata for XboxAuthNet.Game session storage and JWT payloads, and for Minecraft token and profile handling. The default JE account manager combines the Minecraft and Xbox metadata contexts when saving and restoring accounts.

  • Keep netstandard2.0 assets and add net10.0 assets with AOT analysis enabled.
  • Expose XboxGameJsonContext and MicrosoftAuthJsonContext for callers to combine with their own generated contexts.
  • Preserve caller serializer options, resolvers and converters, then append metadata for built-in session models.
  • Remove the reflection fallback, ReflectionEnabled feature guard and warning suppression. Custom session models now require metadata supplied by the caller; custom JWT payloads can use the JsonTypeInfo overload.
  • Preserve profile format-error handling. README, smoke projects and CI workflows are unchanged.

Dependency

Full authentication dependency AOT support requires the changes merged in XboxAuthNet #14, available in the locally built 3.1.0 package. This PR still references the published 3.0.4 package; updating that reference remains necessary after publication.

Validation

  • Release builds for both libraries and both target frameworks: zero warnings and errors.
  • XboxAuthNet.Game tests: 68 passed, including generated custom-model round trips and rejection of unregistered models.
  • Minecraft authentication tests: 4 passed.
  • New metadata regression tests with JSON reflection disabled: 3 passed.
  • Windows x64 Native AOT publication with both libraries rooted for full API analysis: 19 IL warnings with the declared XboxAuthNet 3.0.4 dependency, all originating in XboxAuthNet. The identical build with the merged XboxAuthNet 3.1.0 source dependency has zero IL warnings. Version 3.1.0 is not yet available on NuGet.
  • Both native executables pass 26 mocked authentication, persistence and error-handling checks with JSON reflection disabled.
  • Legacy reflection serialization versus generated metadata: 30 comparisons passed, covering tokens, profiles, claims and primitive values with and without null omission.
  • Existing public signatures and the netstandard2.0 asset remain available. Unregistered session values and generic JWT payloads now require caller metadata; this is an intentional behavioral compatibility change. Serializer options are copied when storage is constructed.
  • Actual account login and NuGet publication were not performed.

@AlphaBs
AlphaBs merged commit 32baa8d into master Oct 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant