Skip to content

Commit

Permalink
Replaced token exp utc calc to use timezone-aware impl (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
petruki authored May 22, 2024
1 parent 228f927 commit d2e85bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/switcher_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __generate_token__(self, resource: str) -> str:
payload = {
"iss": self.__issuer,
"sub": resource,
"exp": datetime.datetime.utcnow() + datetime.timedelta(seconds = 30)
"exp": datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(seconds = 30)
}
)

Expand Down

0 comments on commit d2e85bd

Please sign in to comment.