Class KeychainSecretStoreProvider
java.lang.Object
org.apache.juneau.secret.macos.keychain.KeychainSecretStoreProvider
- All Implemented Interfaces:
SecretStoreProvider
Provider that contributes a
KeychainSecretStore via ServiceLoader, discoverable through
SecretStores.fromServiceLoader() when this module is on the classpath and the host is macOS.
The service name defaults to "org.apache.juneau" but can be overridden via the
"juneau.secret.macos.keychain.service" system property; the fail mode defaults to FailMode.FAIL_CLOSED. On a
non-macOS host (or when the keychain CLI is absent) create() returns
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault keychain service name whenSERVICE_PROPERTYis unset.static final StringSystem property overriding the keychain service name used by the discovered store. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SERVICE_PROPERTY
System property overriding the keychain service name used by the discovered store.- See Also:
-
DEFAULT_SERVICE
Default keychain service name whenSERVICE_PROPERTYis unset.- See Also:
-
-
Constructor Details
-
KeychainSecretStoreProvider
public KeychainSecretStoreProvider()
-
-
Method Details
-
create
Description copied from interface:SecretStoreProviderCreates a secret store.- Specified by:
createin interfaceSecretStoreProvider- Returns:
- The secret store, or
null to skip registration.
-
order
Description copied from interface:SecretStoreProviderSort key used byServiceLoaderwiring.Lower values sort first.
- Specified by:
orderin interfaceSecretStoreProvider- Returns:
- The order value.
-