mirror of
https://github.com/bitwarden/server
synced 2025-12-25 04:33:26 +00:00
* [Reset Password] Organization Keys APIs * Updated details response to include private key and added more security checks for reset password methods * Added org type and policy security checks to the enrollment api * Updated based on PR feedback * Added org user type permission checks * Added TODO for email to user * Removed unecessary policyRepository object
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using Bit.Core.Enums;
|
|
using Bit.Core.Models.Table;
|
|
|
|
namespace Bit.Core.Models.Data
|
|
{
|
|
public class OrganizationUserResetPasswordDetails
|
|
{
|
|
public OrganizationUserResetPasswordDetails(OrganizationUser orgUser, User user, Organization org)
|
|
{
|
|
if (orgUser == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(orgUser));
|
|
}
|
|
|
|
if (user == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(user));
|
|
}
|
|
|
|
if (org == null)
|
|
{
|
|
throw new ArgumentNullException(nameof(org));
|
|
}
|
|
|
|
Kdf = user.Kdf;
|
|
KdfIterations = user.KdfIterations;
|
|
ResetPasswordKey = orgUser.ResetPasswordKey;
|
|
EncryptedPrivateKey = org.PrivateKey;
|
|
}
|
|
public KdfType Kdf { get; set; }
|
|
public int KdfIterations { get; set; }
|
|
public string ResetPasswordKey { get; set; }
|
|
public string EncryptedPrivateKey { get; set; }
|
|
}
|
|
}
|