26 lines
1.2 KiB
SQL
26 lines
1.2 KiB
SQL
-- Google Wallet Pass-Konfiguration.
|
|
-- ====================================================================
|
|
-- Google Wallet liefert Passes als JWT-encoded "Save to Wallet"-Links.
|
|
-- Statt einer signierten ZIP-Datei (Apple) wird ein JWT mit dem
|
|
-- Service-Account-Private-Key signiert, der User klickt darauf, und
|
|
-- Google generiert auf Basis des JWT-Payloads den Pass.
|
|
--
|
|
-- Pro Mandant brauchts:
|
|
-- - Google Cloud Service Account (JSON-Key mit email + private_key)
|
|
-- - Issuer ID (vom Google Pay & Wallet Console, numerisch)
|
|
-- - Class ID Suffix (eigene Wahl, z.B. "teamvis_card")
|
|
-- → Voll-Class-ID wird zur Laufzeit zusammengesetzt:
|
|
-- "<issuer_id>.<class_id_suffix>"
|
|
-- → Class wird inline im JWT mitgesendet (kein Pre-Create noetig).
|
|
--
|
|
-- Wenn alle Felder gesetzt sind, schaltet die Visitenkarte den
|
|
-- "Zur Google Wallet hinzufuegen"-Button frei.
|
|
|
|
alter table public.site_settings
|
|
add column if not exists google_wallet_service_account_json text,
|
|
add column if not exists google_wallet_issuer_id text,
|
|
add column if not exists google_wallet_class_suffix text default 'teamvis_card';
|
|
|
|
-- Hinweis: google_wallet_service_account_json enthaelt den Private Key.
|
|
-- Wie bei apple_pass_cert_p12 nur ueber Service-Role lesbar.
|