mirror of
https://github.com/bitwarden/server
synced 2026-01-02 08:33:48 +00:00
fix(auth-validator): [PM-22975] Client Version Validator - Took in feedback from km. Removed IsV2User in favor of checking the security version on the user.
This commit is contained in:
@@ -11,6 +11,16 @@ public interface IClientVersionValidator
|
||||
Task<bool> ValidateAsync(User user, CustomValidatorRequestContext requestContext);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This validator will use the Client Version on a request, which currently maps
|
||||
/// to the "Bitwarden-Client-Version" header, to determine if a user meets minimum
|
||||
/// required client version for issuing tokens on an old client. This is done to
|
||||
/// incentivize users getting on an updated client when their password encryption
|
||||
/// method has already been updated. Currently this validator looks for the version
|
||||
/// defined by MinimumClientVersionForV2Encryption.
|
||||
///
|
||||
/// If the header is omitted, then the validator returns that this request is valid.
|
||||
/// </summary>
|
||||
public class ClientVersionValidator(
|
||||
ICurrentContext currentContext,
|
||||
IGetMinimumClientVersionForUserQuery getMinimumClientVersionForUserQuery)
|
||||
|
||||
Reference in New Issue
Block a user