mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-01 03:46:25 +02:00
Add refresh token auth routes and utilities
This commit is contained in:
parent
9bd7d74755
commit
f3a9922eb9
8 changed files with 431 additions and 125 deletions
23
surfsense_backend/app/schemas/auth.py
Normal file
23
surfsense_backend/app/schemas/auth.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"""Authentication schemas for refresh token endpoints."""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class RefreshTokenResponse(BaseModel):
|
||||
"""Response from token refresh endpoint."""
|
||||
|
||||
access_token: str
|
||||
refresh_token: str
|
||||
token_type: str = "bearer"
|
||||
|
||||
|
||||
class LogoutResponse(BaseModel):
|
||||
"""Response from logout endpoint (current device)."""
|
||||
|
||||
detail: str = "Successfully logged out"
|
||||
|
||||
|
||||
class LogoutAllResponse(BaseModel):
|
||||
"""Response from logout all devices endpoint."""
|
||||
|
||||
detail: str = "Successfully logged out from all devices"
|
||||
Loading…
Add table
Add a link
Reference in a new issue