VerifyBlind'i bir ASP.NET web sitesine nasıl entegre edeceğinizi gösteren örnek (ASP.NET, Razor Pages +
minimal API). example-web-nextjs ve example-web-php ile aynı akışın .NET sürümüdür.
- Sunucu-taraflı proxy — Tarayıcı
POST /api/generateçağırır; sunucuX-API-Key'i ekleyip VerifyBlindPOST /api/pop/generate'e iletir ve birnoncedöner. API anahtarı tarayıcıya hiç gösterilmez. (Program.cs) - Doğrulama — Kullanıcı QR'ı VerifyBlind mobil ile okutur (
Pages/Send2Mobile.cshtml); doğrulama bitince partner'a imzalı bir token döner. - İmza kontrolü —
POST /api/verifytoken'ı alır,GET /api/public/enclave-keyile enclave public key'ini çekip RSA-PSS imzasını doğrular ve nonce'u tek-kullanımlık tüketir (Services/InMemoryTtlStore.cs).
# .env oluşturun (DotNetEnv ile yüklenir):
# TEST_VERIFYBLIND_API_KEY=<partner API anahtarınız>
# VERIFYBLIND_API_URL=https://api.verifyblind.com # varsayılan
dotnet run # uygulama /net taban yolu altında sunulurDemo nonce deposu tek-instance içindir; üretimde Redis/DB kullanın.
🌐 verifyblind.com · 🧩 Next.js örneği · 🧩 PHP örneği
An example of integrating VerifyBlind into an ASP.NET website (ASP.NET, Razor Pages + minimal API). It is
the .NET version of the same flow as example-web-nextjs and example-web-php.
- Server-side proxy — The browser calls
POST /api/generate; the server adds theX-API-Keyand forwards it to VerifyBlindPOST /api/pop/generate, returning anonce. The API key is never exposed to the browser. (Program.cs) - Verification — The user scans the QR with VerifyBlind mobile (
Pages/Send2Mobile.cshtml); on success a signed token is returned to the partner. - Signature check —
POST /api/verifytakes the token, fetches the enclave public key viaGET /api/public/enclave-key, verifies the RSA-PSS signature, and consumes the nonce once (Services/InMemoryTtlStore.cs).
# Create .env (loaded via DotNetEnv):
# TEST_VERIFYBLIND_API_KEY=<your partner API key>
# VERIFYBLIND_API_URL=https://api.verifyblind.com # default
dotnet run # the app is served under the /net path baseThe demo nonce store is single-instance only; use Redis/DB in production.
🌐 verifyblind.com · 🧩 Next.js example · 🧩 PHP example