Proje: Okul Platform · Hub: Okul Platform — Domain
VerificationService
app/Services/VerificationService.php — E-posta ve telefon doğrulama.
OTP’den farklı: Bu sistem bir hesap özelliğini (e-posta, telefon) doğrulamak için kullanılır. OTP ise login için kullanılır.
Doğrulama Akışı
POST /api/verification→ Kod gönderPOST /api/verification/{code}→ Kodu doğrula
Exception’lar
AttemptLimitException — Çok fazla deneme
InvalidVerificationCodeException — Hatalı kod
InvalidVerifyException — Geçersiz doğrulama isteği
RecordAlreadyVerifiedException — Zaten doğrulanmış
ResendTimeLimitException — Tekrar gönderme süresi dolmadı
VerificationCodeAlreadySentException — Kod zaten gönderildi
VerificationTimeExpiredException — Doğrulama süresi doldu
InvalidVerifiableTypeArgument — Hatalı doğrulama tipi
Events
SendVerificationCodeEvent— Kod gönderildiVerifiedCodeEvent— Kod doğrulandı
Note: VerificationService fluent API — $service->setUserId()->setType()->generateAndSendCode()
Related
- api-auth-system — OTP login (farklı mekanizma)
- api-user-contact-system — Doğrulanacak kişi kontakt