11package org .cryptomator .macos .keychain ;
22
3+ import org .cryptomator .integrations .common .LocalizedDisplayName ;
34import org .cryptomator .integrations .common .OperatingSystem ;
45import org .cryptomator .integrations .common .Priority ;
56import org .cryptomator .integrations .keychain .KeychainAccessException ;
67import org .cryptomator .integrations .keychain .KeychainAccessProvider ;
7- import org .cryptomator .macos .common .Localization ;
88
99/**
1010 * Stores passwords in the macOS system keychain. Requires an authenticated user to do so.
1515 */
1616@ Priority (1010 )
1717@ OperatingSystem (OperatingSystem .Value .MAC )
18+ @ LocalizedDisplayName (bundle = "MacIntegrationsBundle" , key = "org.cryptomator.macos.keychain.touchIdDisplayName" )
1819public class TouchIdKeychainAccess implements KeychainAccessProvider {
1920
2021 private static final String SERVICE_NAME = System .getProperty ("cryptomator.integrationsMac.keychainServiceName" , "Cryptomator" );
@@ -30,21 +31,11 @@ public TouchIdKeychainAccess() {
3031 this .keychain = keychain ;
3132 }
3233
33- @ Override
34- public String displayName () {
35- return Localization .get ().getString ("org.cryptomator.macos.keychain.touchIdDisplayName" );
36- }
37-
3834 @ Override
3935 public void storePassphrase (String key , String displayName , CharSequence passphrase ) throws KeychainAccessException {
4036 keychain .storePassword (SERVICE_NAME , key , passphrase , true );
4137 }
4238
43- @ Override
44- public void storePassphrase (String key , String displayName , CharSequence passphrase , boolean requireOsAuthentication ) throws KeychainAccessException {
45- keychain .storePassword (SERVICE_NAME , key , passphrase , requireOsAuthentication );
46- }
47-
4839 @ Override
4940 public char [] loadPassphrase (String key ) {
5041 return keychain .loadPassword (SERVICE_NAME , key );
0 commit comments