Files
server/src/Core/Repositories/IUserRepository.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.3 KiB
C#
Raw Normal View History

using Bit.Core.Auth.UserFeatures.UserKey;
using Bit.Core.Entities;
using Bit.Core.Models.Data;
2015-12-08 22:57:38 -05:00
namespace Bit.Core.Repositories;
2022-08-29 16:06:55 -04:00
public interface IUserRepository : IRepository<User, Guid>
2015-12-08 22:57:38 -05:00
{
Task<User> GetByEmailAsync(string email);
Task<User> GetBySsoUserAsync(string externalId, Guid? organizationId);
Task<UserKdfInformation> GetKdfInformationByEmailAsync(string email);
2018-03-21 17:41:14 -04:00
Task<ICollection<User>> SearchAsync(string email, int skip, int take);
2017-08-22 15:27:29 -04:00
Task<ICollection<User>> GetManyByPremiumAsync(bool premium);
2017-03-04 21:28:41 -05:00
Task<string> GetPublicKeyAsync(Guid id);
Task<DateTime> GetAccountRevisionDateAsync(Guid id);
2017-07-10 22:08:52 -04:00
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);
2015-12-08 22:57:38 -05:00
}