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 theAtlassianSecurityPasswordEncoder
PasswordEncoderFactoryImpl
(Iterable<PasswordEncoder> encoders) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEncoder
(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()
void
removeEncoder
(PasswordEncoder passwordEncoder) Will remove a given encoder from the available encoders in the PasswordEncoder factoryvoid
setEncoders
(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:PasswordEncoderFactory
This will return an Internal encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getInternalEncoder
in interfacePasswordEncoderFactory
- Parameters:
encoder
- the encoder requested, eg "ssha"- Returns:
- the password encoder for a given type
-
getLdapEncoder
Description copied from interface:PasswordEncoderFactory
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getLdapEncoder
in interfacePasswordEncoderFactory
- Parameters:
encoder
- the encoder requested, eg "ssha"- Returns:
- the password encoder for a given type
-
getEncoder
Description copied from interface:PasswordEncoderFactory
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- Specified by:
getEncoder
in 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:PasswordEncoderFactory
This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held byPasswordEncoder.getKey()
- Specified by:
getSupportedInternalEncoders
in interfacePasswordEncoderFactory
- Returns:
- the keys of the supported encoders
-
getSupportedLdapEncoders
Description copied from interface:PasswordEncoderFactory
This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held byPasswordEncoder.getKey()
- Specified by:
getSupportedLdapEncoders
in interfacePasswordEncoderFactory
- Returns:
- Set<String> of supported encoders
-
addEncoder
Description copied from interface:PasswordEncoderFactory
Hook to add encoders to the factory- Specified by:
addEncoder
in 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:PasswordEncoderFactory
Will remove a given encoder from the available encoders in the PasswordEncoder factory- Specified by:
removeEncoder
in interfacePasswordEncoderFactory
-