Files
kakeibo/backend/api.http
T
suphicakir d6136959b1 feat(auth): kayıt, giriş, çıkış ve oturum (argon2 + JWT httpOnly cookie)
- Kayıt: kullanıcı + hane + örnek kategori/ödeme türü tek transaction'da
- Giriş: beni hatırla (30 gün / oturum), e-posta başına deneme sınırı
- AuthUser extractor: cookie'deki JWT'yi doğrular
- ValidJson: JSON + doğrulama, Türkçe hata mesajları
- api.http: auth istekleri eklendi
- Birim testleri: şifre, JWT, deneme sınırı, seed (11 test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:37:52 +03:00

38 lines
1.1 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### Kakeibo API — örnek istekler (VS Code REST Client eklentisi)
### Satırın üstündeki "Send Request" bağlantısına tıklayın.
@baseUrl = http://localhost:8080/api
### Sağlık kontrolü (DB erişilemezse 503 + "db": "error")
GET {{baseUrl}}/health
# ─────────────────────────── Kimlik doğrulama ───────────────────────────
# REST Client cookie'leri otomatik saklar: kayıt/giriş sonrası diğer istekler oturumlu gider.
### Kayıt (kullanıcı + hane + örnek kategoriler/ödeme türleri oluşur)
POST {{baseUrl}}/auth/register
Content-Type: application/json
{
"name": "Suphi",
"email": "suphi@ornek.com",
"password": "gizli-sifre-123",
"household_name": "Çakır Hanesi"
}
### Giriş ("remember_me": true → 30 gün, false → tarayıcı kapanınca biter)
POST {{baseUrl}}/auth/login
Content-Type: application/json
{
"email": "suphi@ornek.com",
"password": "gizli-sifre-123",
"remember_me": true
}
### Ben kimim? (oturum yoksa 401)
GET {{baseUrl}}/auth/me
### Çıkış
POST {{baseUrl}}/auth/logout