1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-29 08:42:19 -05:00
bitwarden/src/Core/Services/ICaptchaValidationService.cs
Matt Gibson 7a135ae7cd
Protect user registration with captcha (#1480)
* Protect user registration with captcha

* PR feedback
2021-07-22 12:29:06 -05:00

17 lines
553 B
C#

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