使用Python openid库将openid\u shutdown\u ack参数传递给我的应用程序

使用Python openid库将openid\u shutdown\u ack参数传递给我的应用程序,python,openid,Python,Openid,我有一个使用Python OpenID库的应用程序。我用它来验证我的应用程序是否符合google帐户 谷歌正在反对OpenID2.0身份验证。要购买一些extre迁移时间,请允许一个额外的参数() 如何使用Python openid库将传递的openid\u shutdown\u ack参数添加到我的应用程序中?我发现以下解决方案扩展了AuthRequest中的getMessage方法 def extend_with_openid_shutdown_ack(self, realm, return

我有一个使用Python OpenID库的应用程序。我用它来验证我的应用程序是否符合google帐户

谷歌正在反对OpenID2.0身份验证。要购买一些extre迁移时间,请允许一个额外的参数()


如何使用Python openid库将传递的openid\u shutdown\u ack参数添加到我的应用程序中?

我发现以下解决方案扩展了AuthRequest中的getMessage方法

def extend_with_openid_shutdown_ack(self, realm, return_to=None, immediate=False):
    message = consumer.AuthRequest.getMessage(self, realm, return_to, immediate)
    message.setArg(consumer.BARE_NS, 'openid_shutdown_ack','2015-04-20')
    return message
然后在从consumer begin()方法获取请求实例时替换实例的函数

request.getMessage = extend_with_openid_shutdown_ack.__get__(request, type(request))