Skip to content

OAuth·Xbox 인증에 Native AOT 호환 JSON 처리 추가 - #14

Merged
AlphaBs merged 15 commits into
devfrom
codex/native-aot-json
Oct 18, 2026
Merged

AlphaBs merged 15 commits into
devfrom
codex/native-aot-json

Conversation

@AlphaBs

@AlphaBs AlphaBs commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

OAuth and Xbox authentication use generated JSON metadata for built-in models. OAuth query parameters use explicit AddQueries implementations in both JIT and AOT environments.

  • Preserve the original net472, netstandard2.0, and net6.0-windows targets without adding a new framework asset. .NET 10 consumers use netstandard2.0; .NET 10 Windows consumers retain the net6.0-windows asset and default WebView2 UI.
  • Replace anonymous request bodies and proof keys with typed models while preserving JSON property names, ordering, null handling, and the exact body used for signing and sending.
  • Keep shared request DTOs directly under Requests and colocate request-specific DTOs with their request classes. Use file-scoped namespaces in changed files. The proof-key factory and cache use ProofKeyBody.
  • Add JsonTypeInfo overloads for custom request/response models. Serialize signed request bodies directly with resolved JSON metadata before signing and sending. Use one shared serializer configuration: ordinary request DTOs declare WhenWritingNull attributes, while separate signed RPS DTOs preserve null properties and JSON ordering.
  • Each OAuth parameter subclass overrides AddQueries and calls its base implementation before adding its own entries. Apply ExtraQueries last. Attribute-based query discovery is removed; custom queries must use AddQueries or ExtraQueries.
  • Use generated JSON metadata in both JIT and AOT environments. Remove reflection fallback, feature guards, and their warning suppression. Custom models must supply generated JsonTypeInfo; unregistered models are rejected.

Validation

  • Release builds for all three original target frameworks: zero warnings or errors.
  • NUnit tests: all 39 passed using the existing net6.0 test target and netstandard2.0 library asset, both with the default JSON settings and with JSON reflection disabled. Coverage includes custom request/response metadata, rejection of unregistered models, null omission in ordinary requests, and null/order preservation in signed requests.
  • A separate .NET 10 consumer referencing the netstandard2.0 asset published successfully as Windows x64 Native AOT with zero IL warnings. Its 25 mocked request, response, OAuth, and JSON comparison results matched the previous PR review results.
  • No smoke projects, added CI workflows, or README changes are included. No live account login or NuGet publication was performed.

@AlphaBs
AlphaBs changed the base branch from main to dev October 18, 2026 08:58
@AlphaBs
AlphaBs merged commit 80c63fa into dev Oct 18, 2026
1 check passed
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