Last active
August 29, 2015 14:11
-
-
Save xiaobshe/e0a3deef5469429302ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShakeOwnerHandler(BaseHandler): | |
def get(self, template_vars={}): | |
openid = self.get_current_user() | |
if openid is None: | |
code = self.get_argument('code', default=None) | |
if code is None: | |
self.redirect(KURL_SHAKEMONEY_MAIN) | |
return | |
else: | |
appid = APPID | |
appsecret = APPSECRET | |
openid = self.get_oauth_openid(appid, appsecret, code) | |
print 'owner handler oauth:' + openid | |
self.set_cookie_user(openid) | |
print 'openid:' + openid | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment