Class PasswordEncoderFactoryImpl
java.lang.Object
com.atlassian.crowd.password.factory.PasswordEncoderFactoryImpl
- All Implemented Interfaces:
PasswordEncoderFactory
- See Also:
-
Field Summary
Fields inherited from interface com.atlassian.crowd.password.factory.PasswordEncoderFactory
ARGON2_ENCODER, ATLASSIAN_SECURITY_ENCODER, DES_ENCODER, MD5_ENCODER, PLAINTEXT_ENCODER, SHA_ENCODER, SSHA_ENCODER -
Constructor Summary
ConstructorsConstructorDescriptionThis default constructor will initialise the PasswordEncoderFactoryImpl with the required defaultPasswordEncoder's, the current default is currently theAtlassianSecurityPasswordEncoderPasswordEncoderFactoryImpl(Iterable<PasswordEncoder> encoders) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEncoder(PasswordEncoder passwordEncoder) Hook to add encoders to the factorygetEncoder(String encoder) This will return an LDAP encoder for the given key.getInternalEncoder(String encoder) This will return an Internal encoder for the given key.getLdapEncoder(String encoder) This will return an LDAP encoder for the given key.This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held byPasswordEncoder.getKey()This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held byPasswordEncoder.getKey()voidremoveEncoder(PasswordEncoder passwordEncoder) Will remove a given encoder from the available encoders in the PasswordEncoder factoryvoidsetEncoders(Iterable<PasswordEncoder> encoders)
-
Constructor Details
-
PasswordEncoderFactoryImpl
public PasswordEncoderFactoryImpl()This default constructor will initialise the PasswordEncoderFactoryImpl with the required defaultPasswordEncoder's, the current default is currently theAtlassianSecurityPasswordEncoder -
PasswordEncoderFactoryImpl
-
-
Method Details
-
setEncoders
-
getInternalEncoder
Description copied from interface:PasswordEncoderFactoryThis will return an Internal encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getInternalEncoderin interfacePasswordEncoderFactory- Parameters:
encoder- the encoder requested, eg "ssha"- Returns:
- the password encoder for a given type
-
getLdapEncoder
Description copied from interface:PasswordEncoderFactoryThis will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getLdapEncoderin interfacePasswordEncoderFactory- Parameters:
encoder- the encoder requested, eg "ssha"- Returns:
- the password encoder for a given type
-
getEncoder
Description copied from interface:PasswordEncoderFactoryThis will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getEncoderin interfacePasswordEncoderFactory- Parameters:
encoder- the encoder requested, eg "ssha"- Returns:
- the password encoder for a given type
- Throws:
PasswordEncoderNotFoundException- if no encoder is found matching the given key
-
getSupportedInternalEncoders
Description copied from interface:PasswordEncoderFactoryThis will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held byPasswordEncoder.getKey()- Specified by:
getSupportedInternalEncodersin interfacePasswordEncoderFactory- Returns:
- the keys of the supported encoders
-
getSupportedLdapEncoders
Description copied from interface:PasswordEncoderFactoryThis will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held byPasswordEncoder.getKey()- Specified by:
getSupportedLdapEncodersin interfacePasswordEncoderFactory- Returns:
- Set<String> of supported encoders
-
addEncoder
Description copied from interface:PasswordEncoderFactoryHook to add encoders to the factory- Specified by:
addEncoderin interfacePasswordEncoderFactory- Parameters:
passwordEncoder- the password encoder to have available in the factory- Throws:
PasswordEncoderException- if there was an issue add the encoder to the factory
-
removeEncoder
Description copied from interface:PasswordEncoderFactoryWill remove a given encoder from the available encoders in the PasswordEncoder factory- Specified by:
removeEncoderin interfacePasswordEncoderFactory
-