Add keeper password manager template

This commit is contained in:
crschnick 2024-10-10 04:09:05 +00:00
parent 99999eeaec
commit fd3c6f034c

View file

@ -75,7 +75,21 @@ public interface ExternalPasswordManagerTemplate extends PrefsChoiceValue {
}
};
List<ExternalPasswordManagerTemplate> ALL = Stream.of(ONEPASSWORD, BITWARDEN, DASHLANE, LASTPASS, MACOS_KEYCHAIN)
ExternalPasswordManagerTemplate KEEPER = new ExternalPasswordManagerTemplate() {
@Override
public String getTemplate() {
var exec = OsType.getLocal() == OsType.WINDOWS ? "@keeper" : "keeper";
return exec + " get $KEY --format password --unmask";
}
@Override
public String getId() {
return "keeper";
}
};
List<ExternalPasswordManagerTemplate> ALL = Stream.of(ONEPASSWORD, BITWARDEN, DASHLANE, LASTPASS, KEEPER, MACOS_KEYCHAIN)
.filter(externalPasswordManager -> externalPasswordManager.isSelectable())
.toList();
}