Fix problem in OAuth views
authorJessica Tallon <jessica@megworld.co.uk>
Tue, 8 Jul 2014 14:39:24 +0000 (15:39 +0100)
committerJessica Tallon <jessica@megworld.co.uk>
Tue, 22 Jul 2014 22:13:16 +0000 (23:13 +0100)
mediagoblin/oauth/views.py

index f424576b9807761bea1f5a75baba42b3b1933964..5ade7a8da84f2d3a2fb90b9018d0e78488d9a934 100644 (file)
@@ -252,6 +252,7 @@ def authorize(request):
 
     if oauth_request.verifier is None:
         orequest = GMGRequest(request)
+        orequest.resource_owner_key = token
         request_validator = GMGRequestValidator()
         auth_endpoint = AuthorizationEndpoint(request_validator)
         verifier = auth_endpoint.create_verifier(orequest, {})
@@ -333,7 +334,7 @@ def access_token(request):
         error = "Missing required parameter."
         return json_response({"error": error}, status=400)
 
-
+    request.resource_owner_key = parsed_tokens["oauth_consumer_key"]
     request.oauth_token = parsed_tokens["oauth_token"]
     request_validator = GMGRequestValidator(data)
     av = AccessTokenEndpoint(request_validator)