将验证码集成到Symfony2 FOSUserBundle注册中的最简单方法是什么?

时间:2022-10-16 14:10:27

I'm using Symfony2 and the FOSUserBundle to manage registration and logins. I'd like to add a captcha system. Is there are pre-existing bundle or tutorial on this?

我正在使用Symfony2和FOSUserBundle来管理注册和登录。我想添加一个验证码系统。是否有预先存在的捆绑或教程?

Of course, I could try to roll my own using Google re-captcha. In that case, is Google reCaptcha a good choice, or should I use some other API?

当然,我可以尝试使用Google re-captcha自行推出。在那种情况下,谷歌reCaptcha是一个不错的选择,还是应该使用其他一些API?

2 个解决方案

#1


6  

There are indeed a bundles for that, take a look at:

确实存在捆绑,请看一下:

CaptchaBundle

CaptchaBundle

Or

要么

EWZRecaptchaBundle

EWZRecaptchaBundle

Both got (most likely) all the documentation you need added in the README.md file or extended documentation.

两者都(很可能)获得了您在README.md文件或扩展文档中添加的所有文档。

#2


0  

I just wrote a tiny bundle called caitcha-bundle.

我刚刚写了一个叫做caitcha-bundle的小包。

According to this part of the fos user bundle documenation implementation should be quite easy because you only have to activate the caitcha bundle and add $builder->add('caitcha', 'caitcha'); to the form type.

根据fos用户包的这一部分,文档实现应该非常简单,因为你只需要激活caitcha包并添加$ builder-> add('caitcha','caitcha');到表单类型。

Because captcha images and any other approaches that require some user interaction which is not related to the form itself are very annoying in my optinion, I tried to implement an invisible bot protection by using the honeypot method and a check for the time it took to fill in the form. It works well for my use cases but still has to be extended by more checks I suppose. I would appreciate any suggestions to improve this bundle.

因为验证码图像和任何其他需要与表单本身无关的用户交互的方法在我的选择中非常烦人,所以我尝试使用蜜罐方法实现隐形机器人保护,并检查填充所需的时间在表格中。它适用于我的用例,但我仍然需要通过更多检查来扩展。我将不胜感激任何改善此捆绑的建议。

#1


6  

There are indeed a bundles for that, take a look at:

确实存在捆绑,请看一下:

CaptchaBundle

CaptchaBundle

Or

要么

EWZRecaptchaBundle

EWZRecaptchaBundle

Both got (most likely) all the documentation you need added in the README.md file or extended documentation.

两者都(很可能)获得了您在README.md文件或扩展文档中添加的所有文档。

#2


0  

I just wrote a tiny bundle called caitcha-bundle.

我刚刚写了一个叫做caitcha-bundle的小包。

According to this part of the fos user bundle documenation implementation should be quite easy because you only have to activate the caitcha bundle and add $builder->add('caitcha', 'caitcha'); to the form type.

根据fos用户包的这一部分,文档实现应该非常简单,因为你只需要激活caitcha包并添加$ builder-> add('caitcha','caitcha');到表单类型。

Because captcha images and any other approaches that require some user interaction which is not related to the form itself are very annoying in my optinion, I tried to implement an invisible bot protection by using the honeypot method and a check for the time it took to fill in the form. It works well for my use cases but still has to be extended by more checks I suppose. I would appreciate any suggestions to improve this bundle.

因为验证码图像和任何其他需要与表单本身无关的用户交互的方法在我的选择中非常烦人,所以我尝试使用蜜罐方法实现隐形机器人保护,并检查填充所需的时间在表格中。它适用于我的用例,但我仍然需要通过更多检查来扩展。我将不胜感激任何改善此捆绑的建议。