

@_auth_return_future
def get_authenticated_user(self, callback):
    'Fetches the authenticated user data upon redirect.'
    oauth_ns = ''
    for (name, values) in self.request.arguments.items():
        if (name.startswith('openid.ns.') and (values[(- 1)] == b'http://specs.openid.net/extensions/oauth/1.0')):
            oauth_ns = name[10:]
            break
    token = self.get_argument((('openid.' + oauth_ns) + '.request_token'), '')
    if token:
        http = self.get_auth_http_client()
        token = dict(key=token, secret='')
        http.fetch(self._oauth_access_token_url(token), self.async_callback(self._on_access_token, callback))
    else:
        chain_future(OpenIdMixin.get_authenticated_user(self), callback)

dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/auth.py GoogleMixin.get_authenticated_user/original