mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
return default kdf info
This commit is contained in:
parent
294a6dbba5
commit
5d047d52c3
@ -14,6 +14,7 @@ using Bit.Core.Models.Business;
|
|||||||
using Bit.Api.Utilities;
|
using Bit.Api.Utilities;
|
||||||
using Bit.Core.Models.Table;
|
using Bit.Core.Models.Table;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Bit.Core.Models.Data;
|
||||||
|
|
||||||
namespace Bit.Api.Controllers
|
namespace Bit.Api.Controllers
|
||||||
{
|
{
|
||||||
@ -25,9 +26,7 @@ namespace Bit.Api.Controllers
|
|||||||
private readonly IUserRepository _userRepository;
|
private readonly IUserRepository _userRepository;
|
||||||
private readonly ICipherRepository _cipherRepository;
|
private readonly ICipherRepository _cipherRepository;
|
||||||
private readonly IFolderRepository _folderRepository;
|
private readonly IFolderRepository _folderRepository;
|
||||||
private readonly ICipherService _cipherService;
|
|
||||||
private readonly IOrganizationUserRepository _organizationUserRepository;
|
private readonly IOrganizationUserRepository _organizationUserRepository;
|
||||||
private readonly ILicensingService _licenseService;
|
|
||||||
private readonly IPaymentService _paymentService;
|
private readonly IPaymentService _paymentService;
|
||||||
private readonly GlobalSettings _globalSettings;
|
private readonly GlobalSettings _globalSettings;
|
||||||
|
|
||||||
@ -36,9 +35,7 @@ namespace Bit.Api.Controllers
|
|||||||
IUserRepository userRepository,
|
IUserRepository userRepository,
|
||||||
ICipherRepository cipherRepository,
|
ICipherRepository cipherRepository,
|
||||||
IFolderRepository folderRepository,
|
IFolderRepository folderRepository,
|
||||||
ICipherService cipherService,
|
|
||||||
IOrganizationUserRepository organizationUserRepository,
|
IOrganizationUserRepository organizationUserRepository,
|
||||||
ILicensingService licenseService,
|
|
||||||
IPaymentService paymentService,
|
IPaymentService paymentService,
|
||||||
GlobalSettings globalSettings)
|
GlobalSettings globalSettings)
|
||||||
{
|
{
|
||||||
@ -46,9 +43,7 @@ namespace Bit.Api.Controllers
|
|||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
_cipherRepository = cipherRepository;
|
_cipherRepository = cipherRepository;
|
||||||
_folderRepository = folderRepository;
|
_folderRepository = folderRepository;
|
||||||
_cipherService = cipherService;
|
|
||||||
_organizationUserRepository = organizationUserRepository;
|
_organizationUserRepository = organizationUserRepository;
|
||||||
_licenseService = licenseService;
|
|
||||||
_paymentService = paymentService;
|
_paymentService = paymentService;
|
||||||
_globalSettings = globalSettings;
|
_globalSettings = globalSettings;
|
||||||
}
|
}
|
||||||
@ -60,7 +55,11 @@ namespace Bit.Api.Controllers
|
|||||||
var kdfInformation = await _userRepository.GetKdfInformationByEmailAsync(model.Email);
|
var kdfInformation = await _userRepository.GetKdfInformationByEmailAsync(model.Email);
|
||||||
if(kdfInformation == null)
|
if(kdfInformation == null)
|
||||||
{
|
{
|
||||||
throw new NotFoundException();
|
kdfInformation = new UserKdfInformation
|
||||||
|
{
|
||||||
|
Kdf = KdfType.PBKDF2_SHA256,
|
||||||
|
KdfIterations = 100000
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return new PreloginResponseModel(kdfInformation);
|
return new PreloginResponseModel(kdfInformation);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user