Files
Kayori 24f394116a Add sppass/cardless login support
- SppassOpenHandler/LookupHandler/CloseHandler implementing the eAmuse
  sppass.open/lookup/close xrpc methods (request/response schema
  confirmed by tracing the client's psmap-based response parser and by
  live testing against a real cabinet build)
- SppassSessionService backs open/lookup/close with a token-keyed
  session (url + interval for the cabinet to display/poll, later
  card_type/card_id once approved)
- CardlessApi: POST /api/cardless/{token}/approve, letting a signed-in
  player's phone approve the pending token using their account's
  first registered card
- Cardless frontend pages ([token].vue, scan.vue) and useCardlessAuth
  composable driving the approval call
- GetConfig GraphQL query + ConfigQuery resolver so the cardless page
  can show which server it's talking to
- Wire ISppassSessionService and the cardless routes into Program.cs;
  HandlerService now parses model into a GameModel once per request
  instead of re-parsing per handler
2026-09-06 15:13:10 +02:00

13 lines
399 B
C#

using Server.Utils;
namespace Server.GraphQL;
// Lets the frontend read server-side config values instead of hardcoding
// them - starting with the public base URL sppass.open already builds QR
// links from (see ServerAddress + Handlers/Sppass/SppassOpenHandler).
[ExtendObjectType(OperationTypeNames.Query)]
public class ConfigQuery
{
public string PublicUrl() => ServerAddress.PublicUrl;
}