using Bit.Core.Entities; using Bit.Core.Exceptions; namespace Bit.Api.Auth.Validators; /// /// A consistent interface for domains to validate re-encrypted data before saved to database. Some examples are:
/// - All available encrypted data is accounted for
/// - All provided encrypted data belongs to the user ///
/// Request model /// Domain model public interface IRotationValidator { /// /// Validates re-encrypted data before being saved to database. /// /// Request model /// Domain model /// Throws if data fails validation Task ValidateAsync(User user, T data); }