Skip to content

Commit a5028a2

Browse files
committed
Refactor keychain api
Adhere to new version of integration-api See: cryptomator/integrations-api#56
1 parent 1b8a371 commit a5028a2

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradle/libs.versions.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# This file was generated by the Gradle 'init' task.
22
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
33

4+
# ToDo Change to the correct release version of the integrations-api
5+
# ToDo Check, whether JUnit 5 versions are compatible (needs to be the same as for integrations-api)
46
[versions]
5-
org-cryptomator-integrations-api = "1.5.0"
7+
org-cryptomator-integrations-api = "1.6.0-SNAPSHOT"
68
org-junit-jupiter-junit-jupiter = "5.12.0"
79
org-junit-jupiter-junit-jupiter-api = "5.12.0"
810
org-junit-jupiter-junit-jupiter-engine = "5.12.0"

src/main/java/org/purejava/integrations/keychain/KeePassXCAccess.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public KeePassXCAccess() {
2424
}
2525

2626
@Override
27-
public String displayName() { return "KeePassXC"; }
27+
public String getName() { return "KeePassXC"; }
2828

2929
@Override
3030
public boolean isSupported() { return proxy.connect(); }
@@ -57,12 +57,7 @@ public String unlock() {
5757
}
5858

5959
@Override
60-
public void storePassphrase(String vault, String displayName, CharSequence password) throws KeychainAccessException {
61-
storePassphrase(vault, displayName, password, false);
62-
}
63-
64-
@Override
65-
public void storePassphrase(String vault, String name, CharSequence password, boolean requireOsAuthentication) throws KeychainAccessException {
60+
public void storePassphrase(String vault, String name, CharSequence password) throws KeychainAccessException {
6661
if (isLocked()) {
6762
LOG.info("Failed to store password. KeePassXC database is locked. Needs to be unlocked first.");
6863
unlock();
@@ -131,11 +126,6 @@ public void deletePassphrase(String vault) throws KeychainAccessException {
131126
}
132127
}
133128

134-
@Override
135-
public void changePassphrase(String vault, CharSequence password) throws KeychainAccessException {
136-
changePassphrase(vault, "Vault", password);
137-
}
138-
139129
@Override
140130
public void changePassphrase(String vault, String name, CharSequence password) throws KeychainAccessException {
141131
if (isLocked()) {

0 commit comments

Comments
 (0)