27 lines
553 B
Python
27 lines
553 B
Python
from dataclasses import dataclass
|
|
from typing import Optional
|
|
|
|
|
|
@dataclass
|
|
class SessionUser:
|
|
id: str = ""
|
|
registered_on: str = ""
|
|
name: str = ""
|
|
email: str = ""
|
|
email_verified: bool = False
|
|
phone: str = ""
|
|
phone_verified: bool = False
|
|
mfa: bool = False
|
|
|
|
|
|
@property
|
|
def is_authenticated(self) -> bool:
|
|
return True
|
|
|
|
@property
|
|
def email_verification(self) -> bool:
|
|
return self.email_verified
|
|
|
|
@property
|
|
def phone_verification(self) -> bool:
|
|
return self.phone_verification |