Interface PasswordEncoderFactory
- All Known Implementing Classes:
PasswordEncoderFactoryImpl
public interface PasswordEncoderFactory
This factory manages the getting of a PasswordEncoder, based on given encoder key
such as 'MD5', 'SSHA', 'SHA', "PLAINTEXT, "DES"
-
Field Summary
-
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 factory
-
Field Details
-
DES_ENCODER
- See Also:
-
SSHA_ENCODER
- See Also:
-
SHA_ENCODER
- See Also:
-
PLAINTEXT_ENCODER
- See Also:
-
MD5_ENCODER
- See Also:
-
ATLASSIAN_SECURITY_ENCODER
- See Also:
-
ARGON2_ENCODER
- See Also:
-
-
Method Details
-
getInternalEncoder
This will return an Internal encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- 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
-
getLdapEncoder
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- 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
-
getEncoder
This will return an LDAP encoder for the given key. If no encoder is not found a PasswordEncoderNotFoundException will be returned.- 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
This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values held byPasswordEncoder.getKey()
- Returns:
- the keys of the supported encoders
-
getSupportedLdapEncoders
This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values held byPasswordEncoder.getKey()
- Returns:
- Set<String> of supported encoders
-
addEncoder
Hook to add encoders to the factory- 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
Will remove a given encoder from the available encoders in the PasswordEncoder factory
-