(20241214) testing token keys instead of direct ids.

This commit is contained in:
2024-12-14 11:55:05 +05:30
parent 3a03dd4a61
commit c673c3511f
14 changed files with 164 additions and 60 deletions
+7 -1
View File
@@ -83,12 +83,18 @@ import datetime
class CoreAuthTokenModel(BaseModel):
authTokenId: ObjectId = Field(
description = "the id of the document in mongodb that holds this information",
description = "the id of the document in mongodb that holds this information; hide from the ui layer",
frozen = True,
default = None,
alias = "_id"
)
key: ObjectId = Field(
description = "the expendable reference to this auth; expose this to the ui",
frozen = True,
default_factory = lambda: ObjectId()
)
serviceType: Literal["software", "email", "sms", "chat", "paymentGateway"] = Field(
description = "the kind of service this message was sent/received from",
frozen = True