mirror of
https://github.com/bitwarden/server.git
synced 2024-12-23 17:07:42 +01:00
uncomment to require auth-email header (#1604)
This commit is contained in:
parent
2a6132802b
commit
f58b9fcab4
@ -50,13 +50,12 @@ namespace Bit.Core.IdentityServer
|
||||
|
||||
public async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
|
||||
{
|
||||
// Uncomment whenever we want to require the `auth-email` header
|
||||
//if (!AuthEmailHeaderIsValid(context))
|
||||
//{
|
||||
// context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,
|
||||
// "Auth-Email header invalid.");
|
||||
// return;
|
||||
//}
|
||||
if (!AuthEmailHeaderIsValid(context))
|
||||
{
|
||||
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,
|
||||
"Auth-Email header invalid.");
|
||||
return;
|
||||
}
|
||||
|
||||
string bypassToken = null;
|
||||
if (_captchaValidationService.RequireCaptchaValidation(_currentContext))
|
||||
|
Loading…
Reference in New Issue
Block a user