Package org.keycloak.policy
Class BlacklistPasswordPolicyProviderFactory.FileBasedPasswordBlacklist
java.lang.Object
org.keycloak.policy.BlacklistPasswordPolicyProviderFactory.FileBasedPasswordBlacklist
- All Implemented Interfaces:
BlacklistPasswordPolicyProviderFactory.PasswordBlacklist
- Enclosing class:
- BlacklistPasswordPolicyProviderFactory
public static class BlacklistPasswordPolicyProviderFactory.FileBasedPasswordBlacklist
extends Object
implements BlacklistPasswordPolicyProviderFactory.PasswordBlacklist
A
BlacklistPasswordPolicyProviderFactory.FileBasedPasswordBlacklist
uses password-blacklist files as
to construct a BlacklistPasswordPolicyProviderFactory.PasswordBlacklist
.
This implementation uses a dynamically sized BloomFilter
with a provided default false positive probability.
- See Also:
-
BloomFilter
-
Constructor Summary
ConstructorDescriptionFileBasedPasswordBlacklist
(Path blacklistBasePath, String name) FileBasedPasswordBlacklist
(Path blacklistBasePath, String name, double falsePositiveProbability) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether a givenpassword
is contained in thisBlacklistPasswordPolicyProviderFactory.PasswordBlacklist
.double
getName()
protected void
insertPasswordsInto
(com.google.common.hash.BloomFilter<String> filter)
-
Constructor Details
-
FileBasedPasswordBlacklist
Creates a newBlacklistPasswordPolicyProviderFactory.FileBasedPasswordBlacklist
withBlacklistPasswordPolicyProviderFactory.DEFAULT_FALSE_POSITIVE_PROBABILITY
.- Parameters:
blacklistBasePath
- folder containing the blacklistsname
- name of blacklist file
-
FileBasedPasswordBlacklist
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceBlacklistPasswordPolicyProviderFactory.PasswordBlacklist
- Returns:
- the logical name of the
BlacklistPasswordPolicyProviderFactory.PasswordBlacklist
-
getFalsePositiveProbability
public double getFalsePositiveProbability() -
contains
Description copied from interface:BlacklistPasswordPolicyProviderFactory.PasswordBlacklist
Checks whether a givenpassword
is contained in thisBlacklistPasswordPolicyProviderFactory.PasswordBlacklist
.- Specified by:
contains
in interfaceBlacklistPasswordPolicyProviderFactory.PasswordBlacklist
- Returns:
-
insertPasswordsInto
protected void insertPasswordsInto(com.google.common.hash.BloomFilter<String> filter) throws IOException - Throws:
IOException
-