Skip to content

Commit 2ff5196

Browse files
Update src/fastapi_oauth2/middleware.py
Co-authored-by: Artyom Vancyan <[email protected]>
1 parent 454ec2d commit 2ff5196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastapi_oauth2/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def jwt_decode(cls, token: str) -> dict:
5353

5454
@classmethod
5555
def jwt_create(cls, token_data: dict) -> str:
56-
expire = datetime.now(UTC) + timedelta(seconds=cls.expires)
56+
expire = datetime.now(timezone.utc) + timedelta(seconds=cls.expires)
5757
return cls.jwt_encode({**token_data, "exp": expire})
5858

5959

0 commit comments

Comments
 (0)