Esempio n. 1
0
 def get(self):
     # Save the Request Token in a cookie to verify upon callback to help
     # prevent http://oauth.net/advisories/2009-1
     token = friendfeed.fetch_oauth_request_token(FRIENDFEED_API_TOKEN)
     data = "|".join([token["key"], token["secret"]])
     set_cookie(self.response, "FF_API_REQ", data)
     self.redirect(friendfeed.get_oauth_authentication_url(token))
Esempio n. 2
0
	def post(self):
		# Save the Request Token in a cookie to verify upon callback to help
		# prevent http://oauth.net/advisories/2009-1
		oauth_key = model.OAuthKeys.Get("friendfeed")
			
		consumer = dict(
			key = oauth_key.consumer_key,
			secret = oauth_key.consumer_secret
		)
		
		token = friendfeed.fetch_oauth_request_token(consumer)
		logging.info(token)
		
		self.SessionObj.token_secret = token["secret"]
		self.SessionObj.request_token = token["key"]
		
		self.SessionObj.put()
		
		self.redirect(friendfeed.get_oauth_authentication_url(token))