mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
bae03feffe
* Revert "Add git blame entry (#2226)" This reverts commit239286737d
. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a
.
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Bit.Core.Entities;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Identity;
|
|
using Bit.Test.Common.AutoFixture;
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
using Xunit;
|
|
|
|
namespace Bit.Core.Test.Identity
|
|
{
|
|
public class AuthenticationTokenProviderTests : BaseTokenProviderTests<AuthenticatorTokenProvider>
|
|
{
|
|
public override TwoFactorProviderType TwoFactorProviderType => TwoFactorProviderType.Authenticator;
|
|
|
|
public static IEnumerable<object[]> CanGenerateTwoFactorTokenAsyncData
|
|
=> SetupCanGenerateData(
|
|
(
|
|
new Dictionary<string, object>
|
|
{
|
|
["Key"] = "stuff",
|
|
},
|
|
true
|
|
),
|
|
(
|
|
new Dictionary<string, object>
|
|
{
|
|
["Key"] = ""
|
|
},
|
|
false
|
|
)
|
|
);
|
|
|
|
[Theory, BitMemberAutoData(nameof(CanGenerateTwoFactorTokenAsyncData))]
|
|
public override async Task RunCanGenerateTwoFactorTokenAsync(Dictionary<string, object> metaData, bool expectedResponse,
|
|
User user, SutProvider<AuthenticatorTokenProvider> sutProvider)
|
|
{
|
|
await base.RunCanGenerateTwoFactorTokenAsync(metaData, expectedResponse, user, sutProvider);
|
|
}
|
|
}
|
|
}
|