Class LibSecretKeyring
java.lang.Object
org.tentackle.keyring.AbstractKeyring
org.tentackle.keyring.platform.LibSecretKeyring
- All Implemented Interfaces:
Keyring
A keyring backed by the freedesktop.org Secret Service via
libsecret.
Used on Linux and the other Unixes. It needs a Secret Service provider on the session bus, such as
GNOME Keyring, KWallet, or KeePassXC. On a headless machine, over SSH without a session, or in a
container, there usually is none, and the keyring is not available.
The secrets go to the default collection, "login" on most desktops, which the user's login unlocks. They show up in Seahorse ("Passwords and Keys") or KWalletManager with their label.
-
Field Summary
FieldsFields inherited from class AbstractKeyring
PROBE_ACCOUNT, PROBE_SERVICE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractKeyring
defaultLabel, isPersistent, isSecure, load, remove, store, toString
-
Field Details
-
NAME
-
-
Constructor Details
-
LibSecretKeyring
public LibSecretKeyring()Creates the keyring.- Throws:
KeyringException- iflibsecretis not installed
-
-
Method Details
-
getName
-
isAvailable
public boolean isAvailable()Looks up a secret that does not exist, which fails if there is no Secret Service on the session bus. Since nothing matches, no locked collection is unlocked, and the user is not prompted.
- Overrides:
isAvailablein classAbstractKeyring
-
doStore
- Specified by:
doStorein classAbstractKeyring
-
doLoad
- Specified by:
doLoadin classAbstractKeyring
-
doRemove
- Specified by:
doRemovein classAbstractKeyring
-