class_docstr: Abstract implementation of OAuth 2.0.
  
  See `FacebookGraphMixin` or `GoogleOAuth2Mixin` below for example
  implementations.
  
  Class attributes:
  
  * ``_OAUTH_AUTHORIZE_URL``: The service's authorization url.
  * ``_OAUTH_ACCESS_TOKEN_URL``:  The service's access token url.
class_docstr_tok: ["Abstract","implementation","of","OAuth","2.0",".","See","`","FacebookGraphMixin","`","or","`","GoogleOAuth2Mixin","`","below","for","example","implementations",".","Class","attributes",":","*","``","_OAUTH_AUTHORIZE_URL","``",":","The","service","'s","authorization","url",".","*","``","_OAUTH_ACCESS_TOKEN_URL","``",":","The","service","'s","access","token","url","."]
docstr: Redirects the user to obtain OAuth authorization for this service.
  
  Some providers require that you register a redirect URL with
  your application instead of passing one via this method. You
  should call this method to log the user in, and then call
  ``get_authenticated_user`` in the handler for your
  redirect URL to complete the authorization process.
  
  .. versionchanged:: 3.1
     Returns a `.Future` and takes an optional callback.  These are
     not strictly necessary as this method is synchronous,
     but they are supplied for consistency with
     `OAuthMixin.authorize_redirect`.
docstr_tok: ["Redirects","the","user","to","obtain","OAuth","authorization","for","this","service",".","Some","providers","require","that","you","register","a","redirect","URL","with","your","application","instead","of","passing","one","via","this","method",".","You","should","call","this","method","to","log","the","user","in",",","and","then","call","``","get_authenticated_user","``","in","the","handler","for","your","redirect","URL","to","complete","the","authorization","process",".","..","versionchanged",":",":","3.1","Returns","a","`",".Future","`","and","takes","an","optional","callback",".","These","are","not","strictly","necessary","as","this","method","is","synchronous",",","but","they","are","supplied","for","consistency","with","`","OAuthMixin.authorize_redirect","`","."]
code: def authorize_redirect(
      self,
      redirect_uri=None,
      client_id=None,
      client_secret=None,
      extra_params=None,
      callback=None,
      scope=None,
      response_type="code",
  ):
      """Redirects the user to obtain OAuth authorization for this service.
  
      Some providers require that you register a redirect URL with
      your application instead of passing one via this method. You
      should call this method to log the user in, and then call
      ``get_authenticated_user`` in the handler for your
      redirect URL to complete the authorization process.
  
      .. versionchanged:: 3.1
         Returns a `.Future` and takes an optional callback.  These are
         not strictly necessary as this method is synchronous,
         but they are supplied for consistency with
         `OAuthMixin.authorize_redirect`.
      """
      args = {
          "redirect_uri": redirect_uri,
          "client_id": client_id,
          "response_type": response_type,
      }
      if extra_params:
          args.update(extra_params)
      if scope:
          args["scope"] = " ".join(scope)
      self.redirect(url_concat(self._OAUTH_AUTHORIZE_URL, args))
      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 1 for calling the OAuth2Mixin obj's underlying member method code with example usage: obj.authorize_redirect(redirect_uri, client_id, client_secret, extra_params, callback, scope, response_type) without return types