code: def oid_login_handler(self, f, oid):
          
          if request.args.get("openid_complete") != u"yes":
              return f(False)
          consumer = Consumer(SessionWrapper(self), oid.store_factory())
          openid_response = consumer.complete(
              request.args.to_dict(), oid.get_current_url()
          )
          if openid_response.status == SUCCESS:
              return self.after_login(OpenIDResponse(openid_response, []))
          elif openid_response.status == CANCEL:
              oid.signal_error(u"The request was cancelled")
              return redirect(oid.get_current_url())
          oid.signal_error(u"OpenID authentication error")
          return redirect(oid.get_current_url())
docs: Hackish method to make use of oid.login_handler decorator.