aboutsummaryrefslogtreecommitdiffstats
path: root/backend/authentication/user.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/authentication/user.py')
-rw-r--r--backend/authentication/user.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/authentication/user.py b/backend/authentication/user.py
index 6256cae..cd5a249 100644
--- a/backend/authentication/user.py
+++ b/backend/authentication/user.py
@@ -38,6 +38,10 @@ class User(BaseUser):
return f"<@{self.payload['id']}>"
@property
+ def user_id(self) -> str:
+ return str(self.payload["id"])
+
+ @property
def decoded_token(self) -> dict[str, any]:
return jwt.decode(self.token, SECRET_KEY, algorithms=["HS256"])