class_docstr: Abstract implementation of OAuth 1.0 and 1.0a.
  
  See `TwitterMixin` below for an example implementation.
  
  Class attributes:
  
  * ``_OAUTH_AUTHORIZE_URL``: The service's OAuth authorization url.
  * ``_OAUTH_ACCESS_TOKEN_URL``: The service's OAuth access token url.
  * ``_OAUTH_VERSION``: May be either "1.0" or "1.0a".
  * ``_OAUTH_NO_CALLBACKS``: Set this to True if the service requires
    advance registration of callbacks.
  
  Subclasses must also override the `_oauth_get_user_future` and
  `_oauth_consumer_token` methods.
class_docstr_tok: ["Abstract","implementation","of","OAuth","1.0","and","1.0a",".","See","`","TwitterMixin","`","below","for","an","example","implementation",".","Class","attributes",":","*","``","_OAUTH_AUTHORIZE_URL","``",":","The","service","'s","OAuth","authorization","url",".","*","``","_OAUTH_ACCESS_TOKEN_URL","``",":","The","service","'s","OAuth","access","token","url",".","*","``","_OAUTH_VERSION","``",":","May","be","either","``","1.0","''","or","``","1.0a","''",".","*","``","_OAUTH_NO_CALLBACKS","``",":","Set","this","to","True","if","the","service","requires","advance","registration","of","callbacks",".","Subclasses","must","also","override","the","`","_oauth_get_user_future","`","and","`","_oauth_consumer_token","`","methods","."]
docstr: 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.
docstr_tok: ["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","."]
code: def get_authenticated_user(self, callback, http_client=None):
      """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.
      """
      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),
      )
  
imports: from __future__ import absolute_import, division, print_function
  import base64
  import binascii
  import functools
  import hashlib
  import hmac
  import time
  import uuid
  from tornado.concurrent import TracebackFuture, return_future, chain_future
  from tornado import gen
  from tornado import httpclient
  from tornado import escape
  from tornado.httputil import url_concat
  from tornado.log import gen_log
  from tornado.stack_context import ExceptionStackContext
  from tornado.util import unicode_type, ArgReplacer, PY3
label_desc: Use image node_id 2 for calling the OAuthMixin obj's underlying member method code with example usage: obj.get_authenticated_user(callback, http_client) without return types