aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/oauth/oauth.py
diff options
context:
space:
mode:
authorJessica Tallon <tsyesika@tsyesika.se>2015-10-17 00:18:32 +0000
committerJessica Tallon <tsyesika@tsyesika.se>2015-10-17 00:18:32 +0000
commitfd703bb4d0665958d853b89f6069eefd8a8c8113 (patch)
tree0ff2e4773f667e82e3bf11fb40ac39e2d28d1108 /mediagoblin/oauth/oauth.py
parentd216d771f662fc3e0a3417ce06e8355abce99988 (diff)
downloadmediagoblin-fd703bb4d0665958d853b89f6069eefd8a8c8113.tar.lz
mediagoblin-fd703bb4d0665958d853b89f6069eefd8a8c8113.tar.xz
mediagoblin-fd703bb4d0665958d853b89f6069eefd8a8c8113.zip
Fix #5353 - Bug in OAuth which referenced "user"
There was a recent change in 0f3bf8d where several names which were used to refer the actor where renamed to the standard "actor" property name. There were some places in the OAuth decorator and the OAuth views where the old names were still referred. This fixes that.
Diffstat (limited to 'mediagoblin/oauth/oauth.py')
-rw-r--r--mediagoblin/oauth/oauth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mediagoblin/oauth/oauth.py b/mediagoblin/oauth/oauth.py
index 2cc4e790..f6a1bf4b 100644
--- a/mediagoblin/oauth/oauth.py
+++ b/mediagoblin/oauth/oauth.py
@@ -46,9 +46,9 @@ class GMGRequestValidator(RequestValidator):
client_id = self.POST[u"oauth_consumer_key"]
request_token = RequestToken(
- token=token["oauth_token"],
- secret=token["oauth_token_secret"],
- )
+ token=token["oauth_token"],
+ secret=token["oauth_token_secret"],
+ )
request_token.client = client_id
if u"oauth_callback" in self.POST:
request_token.callback = self.POST[u"oauth_callback"]
@@ -63,12 +63,12 @@ class GMGRequestValidator(RequestValidator):
def save_access_token(self, token, request):
""" Saves access token in db """
access_token = AccessToken(
- token=token["oauth_token"],
- secret=token["oauth_token_secret"],
+ token=token["oauth_token"],
+ secret=token["oauth_token_secret"],
)
access_token.request_token = request.oauth_token
request_token = RequestToken.query.filter_by(token=request.oauth_token).first()
- access_token.user = request_token.user
+ access_token.actor = request_token.actor
access_token.save()
def get_realms(*args, **kwargs):