recaptcha repoze.who插件实现
repoze.who.plugins.recaptcha的Python项目详细描述
repoze.who.recaptcha实现recaptcha api的服务器端。这个 IAuthenticatorplugin检查环境中的recaptcha表单值和 请求验证。
repoze.who.recaptcha基于表单处理程序条件工作:
如果未提供form_handler参数,则始终执行身份验证。
如果给定form_handler参数,则仅当 form_handler值(用空格分隔)与 表单已处理。
如果验证成功,则不执行任何操作。否则错误将传递给 environ['repoze.who.error']和HTTPUnauthorzied(401)被触发。
# sample .ini configuration [plugin:recaptcha] use = repoze.who.plugins.captcha:make_authentication_plugin private_key = si3di5ndlam3x44d #optional form_handler = /process /login /admin [authenticators] plugins = recaptcha
更改日志:
0.1-21.09.2008
- 初始释放
0.2-23.09.2008
- 新增:可选表单处理程序参数(使验证成为可选)
- 新增:单元测试
- 更改:ident fixes
- 更改:使用repoze.who.logger