mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00

* layout new key rotation methods - add endpoint with request model - add command with data model - add repository method * layout new key rotation methods - add endpoint with request model - add command with data model - add repository method * formatting * rename account recovery to reset password * fix tests * remove extra endpoint * rename account recovery to reset password * fix tests and formatting * register db calls in command, removing list from user repo * formatting
29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
using Bit.Core.Auth.UserFeatures.UserKey;
|
|
using Bit.Core.Entities;
|
|
using Bit.Core.Models.Data;
|
|
|
|
namespace Bit.Core.Repositories;
|
|
|
|
public interface IUserRepository : IRepository<User, Guid>
|
|
{
|
|
Task<User> GetByEmailAsync(string email);
|
|
Task<User> GetBySsoUserAsync(string externalId, Guid? organizationId);
|
|
Task<UserKdfInformation> GetKdfInformationByEmailAsync(string email);
|
|
Task<ICollection<User>> SearchAsync(string email, int skip, int take);
|
|
Task<ICollection<User>> GetManyByPremiumAsync(bool premium);
|
|
Task<string> GetPublicKeyAsync(Guid id);
|
|
Task<DateTime> GetAccountRevisionDateAsync(Guid id);
|
|
Task UpdateStorageAsync(Guid id);
|
|
Task UpdateRenewalReminderDateAsync(Guid id, DateTime renewalReminderDate);
|
|
Task<IEnumerable<User>> GetManyAsync(IEnumerable<Guid> ids);
|
|
/// <summary>
|
|
/// Sets a new user key and updates all encrypted data.
|
|
/// <para>Warning: Any user key encrypted data not included will be lost.</para>
|
|
/// </summary>
|
|
/// <param name="user">The user to update</param>
|
|
/// <param name="updateDataActions">Registered database calls to update re-encrypted data.</param>
|
|
[Obsolete("Intended for future improvements to key rotation. Do not use.")]
|
|
Task UpdateUserKeyAndEncryptedDataAsync(User user,
|
|
IEnumerable<UpdateEncryptedDataForKeyRotation> updateDataActions);
|
|
}
|