Top Description Fields Constructors Methods
com.github.javakeyring.internal.freedesktop

public Class FreedesktopKeyringBackend

extends Object
implements KeyringBackend
Class Inheritance
All Implemented Interfaces
com.github.javakeyring.internal.KeyringBackend, java.lang.AutoCloseable
Imports
java.io.IOException, java.util.ArrayList, .HashMap, .List, .Map, com.github.javakeyring.BackendNotSupportedException, .PasswordAccessException, com.github.javakeyring.internal.KeyringBackend

Keyring backend which uses Freedesktop Secret service. Seems that concurrent reads/writes are unsafe. Not sure if a problem with the java libraries or the secret-service in dbus.

Maybe replace with https://specifications.freedesktop.org/secret-service/?

Field Summary

Modifier and TypeField and Description
private final SimpleCollection

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes the collection.

public void
deletePassword(String
Service name
service
,
String
Account name
account
)

Implements com.github.javakeyring.internal.KeyringBackend.deletePassword.

Delete password to key store.

private String
getLabel(String service, String account)

private Map<String, String>
getMap(String service, String account)

private List<String>
public String

Returns:

Password related to specified service and account
getPassword
(String
Service name
service
,
String
Account name
account
)

Implements com.github.javakeyring.internal.KeyringBackend.getPassword.

Gets password from key store.

public void
setPassword(String
Service name
service
,
String
Account name
account
,
String
Password
password
)

Implements com.github.javakeyring.internal.KeyringBackend.setPassword.

Sets password to key store.

private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

collectionback to summary
private final SimpleCollection collection

Constructor Detail

FreedesktopKeyringBackendback to summary
public FreedesktopKeyringBackend() throws BackendNotSupportedException

Method Detail

closeback to summary
public void close() throws Exception

Implements java.lang.AutoCloseable.close.

Closes the collection.

Annotations
@Override
Exceptions
Exception:

Doc from java.lang.AutoCloseable.close.

if this resource cannot be closed

deletePasswordback to summary
public void deletePassword(String service, String account) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.deletePassword.

Delete password to key store.

Parameters
service:String

Service name

account:String

Account name

Annotations
@Override
Exceptions
PasswordAccessException:
Thrown when an error happened while deleting the password
getLabelback to summary
private String getLabel(String service, String account)
getMapback to summary
private Map<String, String> getMap(String service, String account)
getObjectPathsback to summary
private List<String> getObjectPaths(Map<String, String> attributes)
getPasswordback to summary
public String getPassword(String service, String account) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.getPassword.

Gets password from key store.

Parameters
service:String

Service name

account:String

Account name

Returns:String

Password related to specified service and account

Annotations
@Override
Exceptions
PasswordAccessException:
Thrown when an error happened while getting password
setPasswordback to summary
public void setPassword(String service, String account, String password) throws PasswordAccessException

Implements com.github.javakeyring.internal.KeyringBackend.setPassword.

Sets password to key store.

Parameters
service:String

Service name

account:String

Account name

password:String

Password

Annotations
@Override
Exceptions
PasswordAccessException:
Thrown when an error happened while saving the password
throwNoExistingCredentialExceptionback to summary
private void throwNoExistingCredentialException(String service, String account) throws PasswordAccessException
throwTooManyCredentialsExceptionback to summary
private void throwTooManyCredentialsException(String service, String account) throws PasswordAccessException