mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 10:09:08 +00:00
18 lines
402 B
Python
18 lines
402 B
Python
from datetime import UTC, datetime
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class GoogleAuthCredentialsBase(BaseModel):
|
|
token: str
|
|
refresh_token: str
|
|
token_uri: str
|
|
client_id: str
|
|
expiry: datetime
|
|
scopes: list[str]
|
|
client_secret: str
|
|
|
|
@property
|
|
def expired(self) -> bool:
|
|
"""Check if the credentials have expired."""
|
|
return self.expiry <= datetime.now(UTC)
|