public class OSXKeychain
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
addGenericPassword(java.lang.String serviceName,
java.lang.String accountName,
java.lang.String password)
Add a non-internet password to the keychain.
|
void |
deleteGenericPassword(java.lang.String serviceName,
java.lang.String accountName)
Delete a generic password from the keychain.
|
java.util.Optional<java.lang.String> |
findGenericPassword(java.lang.String serviceName,
java.lang.String accountName)
Finds an existing non-internet password in the keychain
|
static OSXKeychain |
getInstance()
Get an instance of the keychain.
|
void |
modifyGenericPassword(java.lang.String serviceName,
java.lang.String accountName,
java.lang.String password)
Update an existing non-internet password to the keychain.
|
public static OSXKeychain getInstance() throws OSXKeychainException
OSXKeychainException - If it's not possible to connect to the
keychain.public void addGenericPassword(java.lang.String serviceName,
java.lang.String accountName,
java.lang.String password)
throws OSXKeychainException
serviceName - The name of the service the password is
for.accountName - The account name/username for the
service.password - The password for the service.OSXKeychainException - If an error occurs when communicating
with the OS X keychain.public void modifyGenericPassword(java.lang.String serviceName,
java.lang.String accountName,
java.lang.String password)
throws OSXKeychainException
serviceName - The name of the service the password is
for.accountName - The account name/username for the
service.password - The password for the service.OSXKeychainException - If an error occurs when communicating
with the OS X keychain.public java.util.Optional<java.lang.String> findGenericPassword(java.lang.String serviceName,
java.lang.String accountName)
throws OSXKeychainException
serviceName - The name of the service the password is
for.accountName - The account name/username for the
service.OSXKeychainException - If an error occurs when communicating
with the OS X keychain.public void deleteGenericPassword(java.lang.String serviceName,
java.lang.String accountName)
throws OSXKeychainException
serviceName - The name of the service the password is
for.accountName - The account name/username for the
service.OSXKeychainException - If an error occurs when communicating
with the OS X keychain.