'Fetches the authenticated user data upon redirect.
This method should be called by the handler that receives the
redirect from the `authenticate_redirect()` method (which is
often the same as the one that calls it; in that case you would
call `get_authenticated_user` if the ``openid.mode`` parameter
is present and `authenticate_redirect` if it is not).
The result of this method will generally be used to set a cookie.'

@_auth_return_future
def get_authenticated_user(self, callback, http_client=None):

    args = dict(((k, v[(-1)]) for (k, v) in self.request.arguments.items()))
    args['openid.mode'] = u('check_authentication')
    url = self._OPENID_ENDPOINT
    if (http_client is None):
        http_client = self.get_auth_http_client()
    http_client.fetch(url, functools.partial(self._on_authentication_verified, callback), method='POST', body=urllib_parse.urlencode(args))
