]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make the openid claimed_id available in OpenIDMixin
authorBen Darnell <ben@bendarnell.com>
Sun, 26 Aug 2012 23:45:35 +0000 (16:45 -0700)
committerBen Darnell <ben@bendarnell.com>
Sun, 26 Aug 2012 23:45:35 +0000 (16:45 -0700)
This should be used as a persistent identifier for the user
since it is the only field guaranteed not to change.

Closes #568.

tornado/auth.py

index 78ea9df800576a85488860fa604b4deb805b6633..9410c36880d52cf41f8b9ebefc07f3fb491faf53 100644 (file)
@@ -203,6 +203,9 @@ class OpenIdMixin(object):
             user["locale"] = locale
         if username:
             user["username"] = username
+        claimed_id = self.get_argument("openid.claimed_id", None)
+        if claimed_id:
+            user["claimed_id"] = claimed_id
         callback(user)