mirror of
https://github.com/bitwarden/server.git
synced 2025-06-17 00:03:17 -05:00
Linting.
This commit is contained in:
parent
a08f7c5c7b
commit
87d008b08f
@ -15,7 +15,6 @@ using Bit.Core.Repositories;
|
|||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Tokens;
|
using Bit.Core.Tokens;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
using Core.Auth.Enums;
|
|
||||||
using Fido2NetLib;
|
using Fido2NetLib;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Core.Auth.Enums;
|
namespace Core.Auth.Enums;
|
||||||
|
|
||||||
public enum TwoFactorEmailPurpose
|
public enum TwoFactorEmailPurpose
|
||||||
{
|
{
|
||||||
Login,
|
Login,
|
||||||
Setup,
|
Setup,
|
||||||
NewDeviceVerification,
|
NewDeviceVerification,
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using Bit.Core.Entities;
|
using Bit.Core.Entities;
|
||||||
|
|
||||||
namespace Bit.Core.Auth.Services;
|
namespace Bit.Core.Auth.Services;
|
||||||
|
|
||||||
@ -8,4 +8,4 @@ public interface ITwoFactorEmailService
|
|||||||
Task SendTwoFactorSetupEmailAsync(User user);
|
Task SendTwoFactorSetupEmailAsync(User user);
|
||||||
Task SendNewDeviceVerificationEmailAsync(User user);
|
Task SendNewDeviceVerificationEmailAsync(User user);
|
||||||
Task<bool> VerifyTwoFactorEmailAsync(User user, string token);
|
Task<bool> VerifyTwoFactorEmailAsync(User user, string token);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Bit.Core.Auth.Enums;
|
using Bit.Core.Auth.Enums;
|
||||||
using Bit.Core.Context;
|
using Bit.Core.Context;
|
||||||
@ -91,4 +91,4 @@ public class TwoFactorEmailService : ITwoFactorEmailService
|
|||||||
return await _userManager.VerifyTwoFactorTokenAsync(user,
|
return await _userManager.VerifyTwoFactorTokenAsync(user,
|
||||||
CoreHelpers.CustomProviderName(TwoFactorProviderType.Email), token);
|
CoreHelpers.CustomProviderName(TwoFactorProviderType.Email), token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ public class HandlebarsMailService : IMailService
|
|||||||
SiteName = _globalSettings.SiteName,
|
SiteName = _globalSettings.SiteName,
|
||||||
// We only want to remind users to set up 2FA if they're getting a new device verification email.
|
// We only want to remind users to set up 2FA if they're getting a new device verification email.
|
||||||
// For login with 2FA, and setup of 2FA, we do not want to show the reminder because users are already doing so.
|
// For login with 2FA, and setup of 2FA, we do not want to show the reminder because users are already doing so.
|
||||||
DisplayTwoFactorReminder = purpose == TwoFactorEmailPurpose.NewDeviceVerification
|
DisplayTwoFactorReminder = purpose == TwoFactorEmailPurpose.NewDeviceVerification
|
||||||
};
|
};
|
||||||
await AddMessageContentAsync(message, "Auth.TwoFactorEmail", model);
|
await AddMessageContentAsync(message, "Auth.TwoFactorEmail", model);
|
||||||
message.MetaData.Add("SendGridBypassListManagement", true);
|
message.MetaData.Add("SendGridBypassListManagement", true);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using Bit.Core.Auth.Enums;
|
using Bit.Core.Auth.Enums;
|
||||||
using Bit.Core.Auth.Models;
|
using Bit.Core.Auth.Models;
|
||||||
using Bit.Core.Auth.Services;
|
using Bit.Core.Auth.Services;
|
||||||
using Bit.Core.Context;
|
using Bit.Core.Context;
|
||||||
@ -207,4 +207,4 @@ public class TwoFactorEmailServiceTests
|
|||||||
// .SendTwoFactorEmailAsync(Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<bool>());
|
// .SendTwoFactorEmailAsync(Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<string>(), Arg.Any<bool>());
|
||||||
|
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user