(20241214) testing token keys instead of direct ids.
This commit is contained in:
@@ -101,7 +101,7 @@ class MailGetRequestHeaders(BaseModel):
|
||||
|
||||
class MailGetRequestData(BaseModel):
|
||||
|
||||
tokenId: str = Field(
|
||||
tokenKey: str = Field(
|
||||
description = "the id of the token associated with the mail; needed for security",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
@@ -101,9 +101,9 @@ class MailListRequestHeaders(BaseModel):
|
||||
|
||||
class MailListRequestData(BaseModel):
|
||||
|
||||
tokenIds: str | List[str] = Field(
|
||||
tokenKeys: str | List[str] = Field(
|
||||
description = "the token identifier(s) that tell you which auth-tokens were used for fetching those messages",
|
||||
frozen = True
|
||||
frozen = True,
|
||||
)
|
||||
|
||||
count: int = Field(
|
||||
|
||||
@@ -104,7 +104,7 @@ class MailSyncRequestHeaders(BaseModel):
|
||||
|
||||
class MailSyncRequestData(BaseModel):
|
||||
|
||||
tokenId: str = Field(
|
||||
tokenKey: str = Field(
|
||||
description = "the account identifier (Mongo ObjectId) granted by 'MailOAuthModel.get_account_identifier'",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
@@ -101,7 +101,7 @@ class MailUpdateTagsRequestHeaders(BaseModel):
|
||||
|
||||
class MailUpdateTagsRequestData(BaseModel):
|
||||
|
||||
tokenId: str = Field(
|
||||
tokenKey: str = Field(
|
||||
description = "the id of the token associated with the mail; needed for security",
|
||||
frozen = True
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user