Skip to content

Commit e90f60d

Browse files
Merge pull request #443 from okta/OKTA-917715
Reduce JWT token expiration time.
2 parents 473e637 + 83dd6f9 commit e90f60d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

okta/jwt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class JWT():
1717
OAUTH_ENDPOINT = "/oauth2/v1/token"
1818
HASH_ALGORITHM = "RS256"
1919
PEM_FORMAT = "PKCS1"
20-
ONE_HOUR = 1 * 60 * 60
20+
EXPIRATION = 1 * 60 * 50
2121
JWT_OPTIONS = {
2222
'verify_signature': True,
2323
'verify_aud': True,
@@ -116,7 +116,7 @@ def create_token(org_url, client_id, private_key, kid=None):
116116
my_pem, _ = JWT.get_PEM_JWK(private_key)
117117
# Get current time and expiry time for token
118118
issued_time = int(time.time())
119-
expiry_time = issued_time + JWT.ONE_HOUR
119+
expiry_time = issued_time + JWT.EXPIRATION
120120
# generate unique JWT ID
121121
generated_JWT_ID = str(uuid.uuid4())
122122

0 commit comments

Comments
 (0)