Пример #1
0
        public MfaFido2SignInFidoController(
            Fido2Storage fido2Storage,
            UserManager <WebApplication2User> userManager,
            SignInManager <WebApplication2User> signInManager,
            IOptions <Fido2Configuration> optionsFido2Configuration,
            IStringLocalizerFactory factory)
        {
            _userManager = userManager;
            _optionsFido2Configuration = optionsFido2Configuration;
            _signInManager             = signInManager;
            _userManager  = userManager;
            _fido2Storage = fido2Storage;

            var type         = typeof(SharedResource);
            var assemblyName = new AssemblyName(type.GetTypeInfo().Assembly.FullName);

            _sharedLocalizer = factory.Create("SharedResource", assemblyName.Name);

            _lib = new Fido2NetLib.Fido2(new Fido2Configuration()
            {
                ServerDomain            = _optionsFido2Configuration.Value.ServerDomain,
                ServerName              = _optionsFido2Configuration.Value.ServerName,
                Origin                  = _optionsFido2Configuration.Value.Origin,
                TimestampDriftTolerance = _optionsFido2Configuration.Value.TimestampDriftTolerance,
            });
        }