aboutsummaryrefslogtreecommitdiff
path: root/app/schemas/auth_schemas.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/schemas/auth_schemas.py')
-rw-r--r--app/schemas/auth_schemas.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/schemas/auth_schemas.py b/app/schemas/auth_schemas.py
new file mode 100644
index 0000000..006a7c8
--- /dev/null
+++ b/app/schemas/auth_schemas.py
@@ -0,0 +1,20 @@
+from pydantic import BaseModel
+
+
+class Token(BaseModel):
+ access_token: str
+ refresh_token: str | None = None
+ token_type: str
+
+
+class TokenData(BaseModel):
+ username: str | None = None
+
+
+class User(BaseModel):
+ username: str
+ id: int
+
+
+class UserInDB(User):
+ hashed_password: str