Skip to content

VerifyBlind/example-web-dotnet

Repository files navigation

VerifyBlind — Web Entegrasyon Örneği (.NET)

🇹🇷 Türkçe · 🇬🇧 English

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.


Türkçe

Akış

  1. Sunucu-taraflı proxy — Tarayıcı POST /api/generate çağırır; sunucu X-API-Key'i ekleyip VerifyBlind POST /api/pop/generate'e iletir ve bir nonce döner. API anahtarı tarayıcıya hiç gösterilmez. (Program.cs)
  2. Doğrulama — Kullanıcı QR'ı VerifyBlind mobil ile okutur (Pages/Send2Mobile.cshtml); doğrulama bitince partner'a imzalı bir token döner.
  3. İmza kontrolüPOST /api/verify token'ı alır, GET /api/public/enclave-key ile enclave public key'ini çekip RSA-PSS imzasını doğrular ve nonce'u tek-kullanımlık tüketir (Services/InMemoryTtlStore.cs).

Çalıştırma

# .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 sunulur

Demo nonce deposu tek-instance içindir; üretimde Redis/DB kullanın.

🌐 verifyblind.com · 🧩 Next.js örneği · 🧩 PHP örneği


English

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.

Flow

  1. Server-side proxy — The browser calls POST /api/generate; the server adds the X-API-Key and forwards it to VerifyBlind POST /api/pop/generate, returning a nonce. The API key is never exposed to the browser. (Program.cs)
  2. Verification — The user scans the QR with VerifyBlind mobile (Pages/Send2Mobile.cshtml); on success a signed token is returned to the partner.
  3. Signature checkPOST /api/verify takes the token, fetches the enclave public key via GET /api/public/enclave-key, verifies the RSA-PSS signature, and consumes the nonce once (Services/InMemoryTtlStore.cs).

Running

# 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 base

The demo nonce store is single-instance only; use Redis/DB in production.

🌐 verifyblind.com · 🧩 Next.js example · 🧩 PHP example

About

Example of integrating VerifyBlind into an ASP.NET website (Razor Pages + minimal API). Same flow as the Next.js and PHP examples.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors