1
0
mirror of https://github.com/bitwarden/server synced 2026-01-08 11:33:26 +00:00

Protect user registration with captcha (#1480)

* Protect user registration with captcha

* PR feedback
This commit is contained in:
Matt Gibson
2021-07-22 12:29:06 -05:00
committed by GitHub
parent 46fa6f6673
commit 7a135ae7cd
9 changed files with 64 additions and 13 deletions

View File

@@ -1,13 +1,14 @@
using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Models.Table;
namespace Bit.Core.Services
{
public class NoopCaptchaValidationService : ICaptchaValidationService
{
public bool ServiceEnabled => false;
public string SiteKeyResponseKeyName => null;
public string SiteKey => null;
public bool RequireCaptcha => false;
public bool RequireCaptchaValidation(ICurrentContext currentContext) => false;
public string GenerateCaptchaBypassToken(User user) => "";
public bool ValidateCaptchaBypassToken(string encryptedToken, User user) => false;