microsoft-authentication-library-for-python
microsoft-authentication-library-for-python copied to clipboard
PROPOSAL: support for python requests auth
https://github.com/corteva/msal-requests-auth
Any interest to support something like this (i.e. absorbing msal-requests-auth into msal-python)?
Thanks, @snowman2 , for taking the initiative to create your repo. Because of the unambiguity of source code, this becomes the most clear proposal of all time. :-)
We may not take your project as-is, but we will take inspirations from your project.
- Your project currently wraps MSAL's Device Code Flow. Based on your implementation, your intended scenario is running the Device Code Flow on your current device. In that case, a newer API
acquire_token_interactive()
from recent MSAL versions would be more convenient. - Since we introduced the customizable
http_client
behavior one year ago, MSAL could potentially be used with other http stack. So, it would be difficult to introduce yet another set of requests-only API into MSAL. - Your project still raises a valid point, that you basically wrap our boilerplate sample on cache-handling into one API call. We will see what we can do here. Marking this one as an enhancement, for now.
Since we introduced the customizable http_client behavior one year ago, MSAL could potentially be used with other http stack. So, it would be difficult to introduce yet another set of requests-only API into MSAL.
I think having requests
be the main supported client library wouldn't be a bad direction to go in since it is already a dependency. Also, the amount of code that you add when bringing it in is quite small. With that in mind, I bet you could make a case for it if you were interested. But, I am also biased in the hoping that it will be taken in. :smile:
However, if you prefer to head in the direction to reduce the amount of code necessary in msal-requests-auth
, I am fine with that too.