Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ydb/iam/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import grpc
import time
import abc
from datetime import datetime
from datetime import datetime, timezone
import json
import os

Expand Down Expand Up @@ -43,8 +43,8 @@
def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout, algorithm, token_service_url, subject=None):
assert jwt is not None, "Install pyjwt library to use jwt tokens"
now = time.time()
now_utc = datetime.utcfromtimestamp(now)
exp_utc = datetime.utcfromtimestamp(now + jwt_expiration_timeout)
now_utc = datetime.fromtimestamp(now, timezone.utc)
exp_utc = datetime.fromtimestamp(now + jwt_expiration_timeout, timezone.utc)
payload = {
"iss": account_id,
"aud": token_service_url,
Expand Down
Loading