Skip to content

Commit 63b4081

Browse files
authored
Merge pull request #181 from smart-on-fhir/mikix/str-expires-in
oauth: handle a string expires_in value gracefully
2 parents 19f964c + 4317562 commit 63b4081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fhirclient/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def _request_access_token(self, server, params):
283283
del ret_params['access_token']
284284

285285
if 'expires_in' in ret_params:
286-
expires_in = ret_params.get('expires_in')
286+
expires_in = int(ret_params['expires_in'])
287287
self.expires_at = datetime.now() + timedelta(seconds=expires_in)
288288
del ret_params['expires_in']
289289

0 commit comments

Comments
 (0)