Skip to content

Commit 3bbb059

Browse files
Update codeframe/core/credentials.py
Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
1 parent 3de0f8b commit 3bbb059

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

codeframe/core/credentials.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ class Credential:
116116
@property
117117
def is_expired(self) -> bool:
118118
"""Check if credential has expired."""
119-
if self.expires_at is None:
119+
exp = self.expires_at
120+
if exp is None:
120121
return False
121-
return datetime.now(timezone.utc) > self.expires_at
122+
if exp.tzinfo is None:
123+
exp = exp.replace(tzinfo=timezone.utc)
124+
return datetime.now(timezone.utc) > exp
122125

123126
@property
124127
def masked_value(self) -> str:

0 commit comments

Comments
 (0)