Class CredentialFactory
java.lang.Object
org.frankframework.credentialprovider.CredentialFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateInstance(ISecretProvider... providers) Create an instance using the givenISecretProviders, ignoring the providers specified in the configuration.protected voidexit()static Collection<String> static @Nullable ICredentialsgetCredentials(@Nullable String rawAlias) Entrypoint.static ICredentialsgetCredentials(@Nullable String rawAlias, @Nullable String defaultUsername, @Nullable String defaultPassword) Entrypoint.static CredentialFactorystatic PropertiesGet the configuration properties of the CredentialFactory.static @Nullable StringgetProperty(String key) Get a property of the CredentialFactory, or null if not setstatic @Nullable StringgetProperty(String key, @Nullable String defaultValue) Get a property of the CredentialFactory, or defaultValue if not setstatic booleanhasCredential(String rawAlias) static voidreset()Reset factory to its default state.static @Nullable StringsetProperty(String key, String value) Update the value of a property.
-
Field Details
-
CREDENTIAL_FACTORY_KEY
- See Also:
-
CREDENTIAL_FACTORY_ALIAS_PREFIX_KEY
- See Also:
-
LEGACY_PACKAGE_NAME
- See Also:
-
ORG_FRANKFRAMEWORK_PACKAGE_NAME
- See Also:
-
DEFAULT_USERNAME_FIELD
- See Also:
-
DEFAULT_PASSWORD_FIELD
- See Also:
-
delegates
-
ALLOW_DEFAULT_PASSWORD
protected static boolean ALLOW_DEFAULT_PASSWORD
-
-
Constructor Details
-
CredentialFactory
protected CredentialFactory(boolean allowFallbackProvider)
-
-
Method Details
-
getInstance
-
reset
public static void reset()Reset factory to its default state. -
getProperties
Get the configuration properties of the CredentialFactory. This is a convenience method; you should never modify the properties obtained via this method. -
setProperty
Update the value of a property. This method is for test-usage. Changing the value of any property will clear the loaded CredentialProviders, so that the changes will be reflected in any CredentialProviders accessed since.- Parameters:
key- Name of property to updatevalue- New value of the property, may not be null.- Returns:
- Previous value of the property if set, otherwise null.
-
getProperty
-
getProperty
-
createInstance
Create an instance using the givenISecretProviders, ignoring the providers specified in the configuration.- Throws:
Exception
-
exit
protected void exit() -
hasCredential
-
getCredentials
Entrypoint. Attempts to find the credential for the specified alias. If none is found, returns NULL, else the credential. -
getCredentials
public static ICredentials getCredentials(@Nullable String rawAlias, @Nullable String defaultUsername, @Nullable String defaultPassword) throws NoSuchElementException Entrypoint. Attempts to find the credential for the specified alias. When none is found, uses the default (provided) fallback user/pass combination.- Throws:
NoSuchElementException
-
getConfiguredAliases
-