class_docstr: Abstract implementation of OpenID and Attribute Exchange.
  
  Class attributes:
  
  * ``_OPENID_ENDPOINT``: the identity provider's URI.
class_docstr_tok: ["Abstract","implementation","of","OpenID","and","Attribute","Exchange",".","Class","attributes",":","*","``","_OPENID_ENDPOINT","``",":","the","identity","provider","'s","URI","."]
docstr: Redirects to the authentication URL for this service.
  
  After authentication, the service will redirect back to the given
  callback URI with additional parameters including ``openid.mode``.
  
  We request the given attributes for the authenticated user by
  default (name, email, language, and username). If you don't need
  all those attributes for your app, you can request fewer with
  the ax_attrs keyword argument.
  
  .. 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","to","the","authentication","URL","for","this","service",".","After","authentication",",","the","service","will","redirect","back","to","the","given","callback","URI","with","additional","parameters","including","``","openid.mode","``",".","We","request","the","given","attributes","for","the","authenticated","user","by","default","(","name",",","email",",","language",",","and","username",")",".","If","you","do","n't","need","all","those","attributes","for","your","app",",","you","can","request","fewer","with","the","ax_attrs","keyword","argument",".","..","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 authenticate_redirect(
      self,
      callback_uri=None,
      ax_attrs=["name", "email", "language", "username"],
      callback=None,
  ):
      """Redirects to the authentication URL for this service.
  
      After authentication, the service will redirect back to the given
      callback URI with additional parameters including ``openid.mode``.
  
      We request the given attributes for the authenticated user by
      default (name, email, language, and username). If you don't need
      all those attributes for your app, you can request fewer with
      the ax_attrs keyword argument.
  
      .. 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`.
      """
      callback_uri = callback_uri or self.request.uri
      args = self._openid_args(callback_uri, ax_attrs=ax_attrs)
      self.redirect(
          self._OPENID_ENDPOINT + "?" + urllib_parse.urlencode(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 OpenIdMixin obj's underlying member method code with example usage: obj.authenticate_redirect(callback_uri, ax_attrs, callback) without return types