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>
This commit is contained in:
@@ -5,7 +5,6 @@ use std::env;
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Config {
|
||||
pub mongodb_uri: String,
|
||||
#[allow(dead_code)] // Faz 1 – Adım 3'te (JWT) kullanılacak
|
||||
pub jwt_secret: String,
|
||||
pub app_url: String,
|
||||
pub port: u16,
|
||||
@@ -49,7 +48,6 @@ impl Config {
|
||||
}
|
||||
|
||||
/// Cookie'lerde `Secure` bayrağı yalnızca HTTPS'te açılır.
|
||||
#[allow(dead_code)] // Faz 1 – Adım 3'te (kimlik doğrulama) kullanılacak
|
||||
pub fn is_https(&self) -> bool {
|
||||
self.app_url.starts_with("https://")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user