1
0
mirror of https://github.com/bitwarden/server synced 2025-12-26 05:03:18 +00:00
Files
server/src/Core/Services/ICaptchaValidationService.cs
Vincent Salucci 7046aecfd5 [Captcha] BUG Add null checks | Make ceiling default to zero (#1903)
* [Captcha] BUG Add null checks | Make ceiling default to zero

* Formatting
2022-03-09 12:07:06 -06:00

18 lines
665 B
C#

using System.Threading.Tasks;
using Bit.Core.Context;
using Bit.Core.Entities;
namespace Bit.Core.Services
{
public interface ICaptchaValidationService
{
string SiteKey { get; }
string SiteKeyResponseKeyName { get; }
bool RequireCaptchaValidation(ICurrentContext currentContext, int failedLoginCount = 0);
Task<bool> ValidateCaptchaResponseAsync(string captchResponse, string clientIpAddress);
string GenerateCaptchaBypassToken(User user);
bool ValidateCaptchaBypassToken(string encryptedToken, User user);
bool ValidateFailedAuthEmailConditions(bool unknownDevice, int failedLoginCount);
}
}