'Gets the OAuth authorized user and access token.
This method should be called from the handler for your
OAuth callback URL to complete the registration process. We run the
callback with the authenticated user dictionary.  This dictionary
will contain an ``access_key`` which can be used to make authorized
requests to this service on behalf of the user.  The dictionary will
also contain other fields such as ``name``, depending on the service
used.'

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

    future = callback
    request_key = escape.utf8(self.get_argument('oauth_token'))
    oauth_verifier = self.get_argument('oauth_verifier', None)
    request_cookie = self.get_cookie('_oauth_request_token')
    if (not request_cookie):
        future.set_exception(AuthError('Missing    OAuth    request    token    cookie'))
        return
    self.clear_cookie('_oauth_request_token')
    (cookie_key, cookie_secret) = [base64.b64decode(escape.utf8(i)) for i in request_cookie.split('|')]
    if (cookie_key != request_key):
        future.set_exception(AuthError('Request    token    does    not    match    cookie'))
        return
    token = dict(key=cookie_key, secret=cookie_secret)
    if oauth_verifier:
        token['verifier'] = oauth_verifier
    if (http_client is None):
        http_client = self.get_auth_http_client()
    http_client.fetch(self._oauth_access_token_url(token), functools.partial(self._on_access_token, callback))
