Convert the payload to a dictionary format.
(self)
| 38 | dev: bool = False |
| 39 | |
| 40 | def asdict(self) -> dict: |
| 41 | """Convert the payload to a dictionary format.""" |
| 42 | properties = { |
| 43 | "exp": self.exp, |
| 44 | "aud": self.aud, |
| 45 | "project_id": self.project_id, |
| 46 | "project_prem_status": self.project_prem_status, |
| 47 | "api_key": self.api_key, |
| 48 | } |
| 49 | |
| 50 | if self.dev: |
| 51 | properties["dev"] = self.dev |
| 52 | |
| 53 | return properties |
| 54 | |
| 55 | @classmethod |
| 56 | def from_project(cls, project: ProjectModel, dev: bool = False) -> "JWTPayload": |
no outgoing calls