1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 21:18:13 -05:00

uncomment to require auth-email header (#1604)

This commit is contained in:
Kyle Spearrin 2021-09-30 11:24:29 -04:00 committed by GitHub
parent 2a6132802b
commit f58b9fcab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,13 +50,12 @@ namespace Bit.Core.IdentityServer
public async Task ValidateAsync(ResourceOwnerPasswordValidationContext context) public async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
{ {
// Uncomment whenever we want to require the `auth-email` header if (!AuthEmailHeaderIsValid(context))
//if (!AuthEmailHeaderIsValid(context)) {
//{ context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,
// context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, "Auth-Email header invalid.");
// "Auth-Email header invalid."); return;
// return; }
//}
string bypassToken = null; string bypassToken = null;
if (_captchaValidationService.RequireCaptchaValidation(_currentContext)) if (_captchaValidationService.RequireCaptchaValidation(_currentContext))