feat(deck-builder): /deck_code mint + /deck resolve with 3-min in-memory TTL

Adds the portal pair (shadowverse-portal.com deck-builder endpoints) as
anonymous routes on the app server. The translation middleware learns a new
[NoWireEncryption] attribute that skips both AES calls but keeps the rest of
the msgpack + base64 + envelope pipeline intact, matching prod's portal wire
profile observed in data_dumps/traffic_prod_deckcode.ndjson.

Storage is a 3-minute IMemoryCache — codes are anonymous-global, 4-char
lowercase alphanumeric (matches the shortest prod sample). Foil bit is
stripped on mint to match prod's normalize-on-encode behaviour.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-28 09:11:21 -04:00
parent 71b0c66631
commit 5aac24d2b9
13 changed files with 540 additions and 12 deletions

View File

@@ -0,0 +1,17 @@
using SVSim.EmulatedEntrypoint.Models.Dtos.Responses.DeckBuilder;
namespace SVSim.EmulatedEntrypoint.Services;
public interface IDeckCodeService
{
/// <summary>
/// Stores <paramref name="payload"/> under a freshly minted token and returns it. The token
/// is valid for <see cref="DeckCodeService.Ttl"/> from this call.
/// </summary>
string Mint(DeckPayload payload);
/// <summary>
/// Returns the deck payload for an unexpired code, or null on miss/expired.
/// </summary>
DeckPayload? TryResolve(string code);
}