1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05: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

@ -9,7 +9,7 @@ using Newtonsoft.Json;
namespace Bit.Core.Models.Api
{
public class RegisterRequestModel : IValidatableObject
public class RegisterRequestModel : IValidatableObject, ICaptchaProtectedModel
{
[StringLength(50)]
public string Name { get; set; }
@ -22,6 +22,7 @@ namespace Bit.Core.Models.Api
public string MasterPasswordHash { get; set; }
[StringLength(50)]
public string MasterPasswordHint { get; set; }
public string CaptchaResponse { get; set; }
public string Key { get; set; }
public KeysRequestModel Keys { get; set; }
public string Token { get; set; }

View File

@ -0,0 +1,7 @@
namespace Bit.Core.Models.Api
{
public interface ICaptchaProtectedModel
{
string CaptchaResponse { get; set; }
}
}