mirror of
https://github.com/bitwarden/server.git
synced 2025-06-15 07:20:49 -05:00

* [Hacker1] Failed Login Attempts Captcha * [Captcha] Implement failed logins ceiling * Formatting * Updated approach after implementation talks with Kyle * Updated email templates // Updated calling arch for failed attempts * Formatting * Updated 2fa email links * Renamed baserequest methods to better match their actions * EF migrations/scripts * Updated with requested changes * Defaults for MaxiumumFailedLoginAttempts
21 lines
832 B
C#
21 lines
832 B
C#
using System.Threading.Tasks;
|
|
using Bit.Core.Context;
|
|
using Bit.Core.Entities;
|
|
|
|
namespace Bit.Core.Services
|
|
{
|
|
public class NoopCaptchaValidationService : ICaptchaValidationService
|
|
{
|
|
public string SiteKeyResponseKeyName => null;
|
|
public string SiteKey => null;
|
|
public bool RequireCaptchaValidation(ICurrentContext currentContext, int? failedLoginCount) => false;
|
|
public bool ValidateFailedAuthEmailConditions(bool unknownDevice, int failedLoginCount) => false;
|
|
public string GenerateCaptchaBypassToken(User user) => "";
|
|
public bool ValidateCaptchaBypassToken(string encryptedToken, User user) => false;
|
|
public Task<bool> ValidateCaptchaResponseAsync(string captchResponse, string clientIpAddress)
|
|
{
|
|
return Task.FromResult(true);
|
|
}
|
|
}
|
|
}
|