ibmresilient / resilient-python-api

Python Library for the IBM SOAR REST API, a Python SDK for developing Apps for IBM SOAR and more...
https://ibm.biz/soar-python-docs
MIT License
39 stars 28 forks source link

fixed update_token infinite recursion bug #18

Closed lmahoney1 closed 3 years ago

lmahoney1 commented 3 years ago

Signed-off-by: Liam Mahoney lmahoney@oshkoshcorp.com

Fixed infinite recursion bug in the resilient-lib.OAuth2ClientCredentialsSession.update_token method.

Description

Added the logic to make sure that the request isn't to refresh the authorization token before checking whether that token is expired.

Motivation and Context

17

How Has This Been Tested?

Verified that I can refresh an expired bearer token with Microsoft Security Graph after this change.

Checklist:

Signed-off-by: Liam Mahoney lmahoney@oshkoshcorp.com

sj-curtin commented 3 years ago

Thanks Liam for this fix!!

We have an internal process to get this into our Public repository here and can confirm that the fix will be in resilient-lib v42.0.x