Class FileSystemCredentialFactory
java.lang.Object
org.frankframework.credentialprovider.FileSystemCredentialFactory
- All Implemented Interfaces:
ICredentialFactory
CredentialFactory implementation that reads secrets from the file system.
It reads the username and password from files in a directory. The directory is set by the property "credentialFactory.filesystem.root".
It reads the username from a file with the name set by the property "credentialFactory.filesystem.usernamefile" and the password from a file with the name set by the property "credentialFactory.filesystem.passwordfile". These values are relative to the "credentialFactory.filesystem.root"
By default, the default values username
and password
are used for these files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn a list of all configured aliases, or null if such a list cannot be provided.getCredentials
(String alias, Supplier<String> defaultUsernameSupplier, Supplier<String> defaultPasswordSupplier) boolean
hasCredentials
(String alias) void
initialize() of an implementation can throw an exception when the credentialFactory cannot be properly configured and used.
-
Constructor Details
-
FileSystemCredentialFactory
public FileSystemCredentialFactory()
-
-
Method Details
-
initialize
public void initialize()Description copied from interface:ICredentialFactory
initialize() of an implementation can throw an exception when the credentialFactory cannot be properly configured and used.- Specified by:
initialize
in interfaceICredentialFactory
-
hasCredentials
- Specified by:
hasCredentials
in interfaceICredentialFactory
-
getCredentials
public ICredentials getCredentials(String alias, Supplier<String> defaultUsernameSupplier, Supplier<String> defaultPasswordSupplier) - Specified by:
getCredentials
in interfaceICredentialFactory
-
getConfiguredAliases
Description copied from interface:ICredentialFactory
return a list of all configured aliases, or null if such a list cannot be provided.- Specified by:
getConfiguredAliases
in interfaceICredentialFactory
- Throws:
Exception
-