Skip to content
Snippets Groups Projects
Unverified Commit 4e388eac authored by Arunmozhi's avatar Arunmozhi Committed by Kshitij Sobti
Browse files

refactor: replace oauth param fetching from client to signature method

The OAuthlib 1.0 Client's get_oauth_params fails when processing Webob
request object with the body stored as a binary instead of string.
This commit replaces the client function with a different one which
doesn't involve body hashing, as the body hash is calculated explicitly.
parent 224e65ee
No related branches found
No related tags found
No related merge requests found
......@@ -147,7 +147,7 @@ def log_authorization_header(request, client_key, client_secret):
oauth_body_hash = str(base64.b64encode(sha1.digest()))
log.debug("[LTI] oauth_body_hash = %s", oauth_body_hash)
client = oauth1.Client(client_key, client_secret)
params = client.get_oauth_params(request)
params = oauth1.rfc5849.signature.collect_parameters(headers=request.headers, exclude_oauth_signature=False)
params.append(('oauth_body_hash', oauth_body_hash))
mock_request = SignedRequest(
uri=str(urllib.parse.unquote(request.url)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment