feat: enhance refresh token handling with grace period and rotation detection
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m17s
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m17s
This commit is contained in:
@@ -9,6 +9,7 @@ class RefreshToken(BaseModel):
|
||||
token_family: str = ''
|
||||
expires_at: str = ''
|
||||
is_used: bool = False
|
||||
rotated_at: str | None = None
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
@@ -18,6 +19,7 @@ class RefreshToken(BaseModel):
|
||||
'token_family': self.token_family,
|
||||
'expires_at': self.expires_at,
|
||||
'is_used': self.is_used,
|
||||
'rotated_at': self.rotated_at,
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
@@ -31,4 +33,5 @@ class RefreshToken(BaseModel):
|
||||
token_family=data.get('token_family', ''),
|
||||
expires_at=data.get('expires_at', ''),
|
||||
is_used=data.get('is_used', False),
|
||||
rotated_at=data.get('rotated_at'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user