Skip to content

Commit

Permalink
Update jwt.py
Browse files Browse the repository at this point in the history
60 minutes is too long and causes error #382
  • Loading branch information
gabrielsroka authored Jan 28, 2025
1 parent 597908a commit 5a1aab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions okta/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class JWT():
OAUTH_ENDPOINT = "/oauth2/v1/token"
HASH_ALGORITHM = "RS256"
PEM_FORMAT = "PKCS1"
ONE_HOUR = 1 * 60 * 60
EXPIRATION = 1 * 60 * 59
JWT_OPTIONS = {
'verify_signature': True,
'verify_aud': True,
Expand Down Expand Up @@ -116,7 +116,7 @@ def create_token(org_url, client_id, private_key, kid=None):
my_pem, _ = JWT.get_PEM_JWK(private_key)
# Get current time and expiry time for token
issued_time = int(time.time())
expiry_time = issued_time + JWT.ONE_HOUR
expiry_time = issued_time + JWT.EXPIRATION
# generate unique JWT ID
generated_JWT_ID = str(uuid.uuid4())

Expand Down

0 comments on commit 5a1aab3

Please sign in to comment.