You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, flask-oauth is letting oauth2 do whatever it likes with regards to signature method. That means, it's mostly using HMAC_SHA1. However, some oauth servers will only accept PLAINTEXT as the signature method.
It's not too bad to set the signature method right after creating the remote_app, although it does mean accessing the _client which might not be totally obvious to some folks. It looks like this:
What doesn't work at all is using the authorized_handler decorator. When it calls make_client, it doesn't care about signature method. I had to add this around line 300 of oauth.py:
So, the issue is how to handle signature method better and allow for greater flexibility. Maybe if we just set it in the init() of OAuthRemoteApp(), we could just use it as a class attribute everywhere else. That assumes that a single remote_app always uses the same signature method, but from what I can see, that's a pretty safe assumption.
The text was updated successfully, but these errors were encountered:
Currently, flask-oauth is letting oauth2 do whatever it likes with regards to signature method. That means, it's mostly using
HMAC_SHA1
. However, some oauth servers will only acceptPLAINTEXT
as the signature method.It's not too bad to set the signature method right after creating the
remote_app
, although it does mean accessing the_client
which might not be totally obvious to some folks. It looks like this:What doesn't work at all is using the
authorized_handler
decorator. When it callsmake_client
, it doesn't care about signature method. I had to add this around line 300 of oauth.py:So, the issue is how to handle signature method better and allow for greater flexibility. Maybe if we just set it in the
init()
ofOAuthRemoteApp()
, we could just use it as a class attribute everywhere else. That assumes that a singleremote_app
always uses the same signature method, but from what I can see, that's a pretty safe assumption.The text was updated successfully, but these errors were encountered: