Add graphic captcha before user SMS login
This commit is contained in:
@@ -9,6 +9,8 @@ from app.schemas.user import UserProfile
|
||||
|
||||
class SendSmsRequest(BaseModel):
|
||||
phone: str = Field(min_length=11, max_length=20)
|
||||
captchaId: str = Field(min_length=1, max_length=100)
|
||||
captchaCode: str = Field(min_length=4, max_length=8)
|
||||
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
@@ -20,3 +22,9 @@ class LoginResponse(BaseModel):
|
||||
token: str
|
||||
expiredAt: datetime
|
||||
user: UserProfile
|
||||
|
||||
|
||||
class CaptchaResponse(BaseModel):
|
||||
captchaId: str
|
||||
imageBase64: str
|
||||
expiresInSeconds: int
|
||||
|
||||
Reference in New Issue
Block a user