Commit 503b09ef authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

oauth2Mixin: python3 compatibility

parent 1b690ba5
......@@ -1123,7 +1123,7 @@ class OAuth2PKCEMixin(OAuth2Mixin):
return base64.urlsafe_b64encode(os.urandom(bytes_number)).rstrip(b'=').decode('ascii')
def code_challenge(self, verifier):
digest = sha256(verifier).digest()
digest = sha256(verifier.encode('utf8')).digest()
return base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii')
def build_authorization_parameters(self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment