1. anatoly techtonik
  2. pypi-techtonik

Commits

Richard Jones  committed fd837f2

recognise the user being identified by the access token

  • Participants
  • Parent commits 0591a1f
  • Branches default

Comments (0)

Files changed (2)

File oauth_test.py

View file
  • Ignore whitespace
     ACCESS_KEY = 'AJLks8p4zezH2ud9R7OQy98eRLXf8zut'
     ACCESS_SECRET = 'vSXBEWk5kn6wvVGivILPyBmtRitDvJq0cVcmBDk57eX2XCENvp2da3ou7v09TxrL'
     access_token = oauth.OAuthToken(ACCESS_KEY, ACCESS_SECRET)
-    example_access(access_token)
+    example_test(access_token)
     example_release(access_token, name='spam', version='2.0')
 

File webui.py

View file
  • Ignore whitespace
         r = self._oauth_request()
         consumer, token, params = s.verify_request(r)
         user = s.data_store._get_user(token)
+        # recognise the user as accessing during this request
+        self.username = user
+        self.store.set_user(user, self.env['REMOTE_ADDR'], False)
+        self.authenticated = True
         return consumer, token, params, user
 
     def oauth_test_access(self):