Skip to content

Commit

Permalink
Workaround for PyMsalRuntime's expiry time
Browse files Browse the repository at this point in the history
  • Loading branch information
rayluo committed Jun 22, 2022
1 parent 1f031e8 commit ede91cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion msal/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from threading import Event
import json
import logging
import time
import uuid


Expand Down Expand Up @@ -91,7 +92,9 @@ def _convert_result(result, client_id, expected_token_type=None): # Mimic an on
#account.get_account_property("wam_account_ids")
return_value = {k: v for k, v in {
"access_token": result.get_access_token(),
"expires_in": result.get_access_token_expiry_time(),
"expires_in":
result.get_access_token_expiry_time() # As of pymsalruntime 0.9, it returns an epoch
- int(time.time()),
"id_token": result.get_raw_id_token(), # New in pymsalruntime 0.8.1
"id_token_claims": id_token_claims,
"client_info": account.get_client_info(),
Expand Down

0 comments on commit ede91cd

Please sign in to comment.