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
I'm seeing a problem anywhere this library is using client secret basic as the auth mechanism. The issue boils down to:
bas = 'foo:bar'
bytes = bytearray(bas, 'utf-8')
s = 'Basic %s' % b64encode(bytes)
s
"Basic b'Zm9vOmJhcg=='"
s2 = 'Basic %s' % b64encode(bytes).decode('utf-8')
s2
'Basic Zm9vOmJhcg=='
In python 3.6.4, serializing bytes is outputting b'actual_value', which is then failing authentication. Adding a .decode('utf-8') results in a string, and the b'' isn't added anymore. This doesn't manifest in python 2.
The following works in both python 2 and 3:
bas = 'foo:bar'
bytes = bytearray(bas, 'utf-8')
s = str('Basic %s' % b64encode(bytes).decode('utf-8'))
s
Would this be something you're willing to incorporate? I can get a PR ready for this if so. (I think this affects #44 as well).
The text was updated successfully, but these errors were encountered:
I'm seeing a problem anywhere this library is using client secret basic as the auth mechanism. The issue boils down to:
In python 3.6.4, serializing bytes is outputting b'actual_value', which is then failing authentication. Adding a .decode('utf-8') results in a string, and the b'' isn't added anymore. This doesn't manifest in python 2.
The following works in both python 2 and 3:
Would this be something you're willing to incorporate? I can get a PR ready for this if so. (I think this affects #44 as well).
The text was updated successfully, but these errors were encountered: