Add a 2nd password filter enum but this one is only for input passwords.
Specifically, the 'hidden' filter makes no sense because we don't want
junk passwords in the data store so we only take unfiltered or base64
obscured password values.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
NONE = 'none'
BASE64 = 'base64'
HIDDEN = 'hidden'
+
+
+class InputPasswordFilter(_StrEnum):
+ """Filter type for input password values."""
+
+ NONE = 'none'
+ BASE64 = 'base64'
+
+ def to_password_filter(self) -> PasswordFilter:
+ """Convert input password filter to password filter type."""
+ # This is because python doesn't allow extending enums (with values)
+ # but we want a InputPasswordFilter to be a strict subset of the
+ # password filter enum.
+ return PasswordFilter(self.value)