public class PasswordEncoderFactoryImpl extends Object implements PasswordEncoderFactory
PasswordEncoderFactory
ATLASSIAN_SECURITY_ENCODER, DES_ENCODER, MD5_ENCODER, PLAINTEXT_ENCODER, SHA_ENCODER, SSHA_ENCODER
Constructor and Description |
---|
PasswordEncoderFactoryImpl()
This default constructor will initialise the PasswordEncoderFactoryImpl with the required default
PasswordEncoder 's, the current default is currently the AtlassianSecurityPasswordEncoder |
PasswordEncoderFactoryImpl(Iterable<PasswordEncoder> encoders) |
Modifier and Type | Method and Description |
---|---|
void |
addEncoder(PasswordEncoder passwordEncoder)
Hook to add encoders to the factory
|
PasswordEncoder |
getEncoder(String encoder)
This will return an LDAP encoder for the given key.
|
PasswordEncoder |
getInternalEncoder(String encoder)
This will return an Internal encoder for the given key.
|
PasswordEncoder |
getLdapEncoder(String encoder)
This will return an LDAP encoder for the given key.
|
Set<String> |
getSupportedInternalEncoders()
This will return a list of supported encoders suitable for use in an Internal Directory, this will be the values
held by
PasswordEncoder.getKey() |
Set<String> |
getSupportedLdapEncoders()
This will return a list of supported encoders for a Remote Directory using LDAP, this will be the values
held by
PasswordEncoder.getKey() |
void |
removeEncoder(PasswordEncoder passwordEncoder)
Will remove a given encoder from the available encoders in the PasswordEncoder factory
|
void |
setEncoders(Iterable<PasswordEncoder> encoders) |
public PasswordEncoderFactoryImpl()
PasswordEncoder
's, the current default is currently the AtlassianSecurityPasswordEncoder
public PasswordEncoderFactoryImpl(Iterable<PasswordEncoder> encoders)
public void setEncoders(Iterable<PasswordEncoder> encoders)
public PasswordEncoder getInternalEncoder(String encoder)
PasswordEncoderFactory
getInternalEncoder
in interface PasswordEncoderFactory
encoder
- the encoder requested, eg "ssha"public PasswordEncoder getLdapEncoder(String encoder)
PasswordEncoderFactory
getLdapEncoder
in interface PasswordEncoderFactory
encoder
- the encoder requested, eg "ssha"public PasswordEncoder getEncoder(String encoder) throws PasswordEncoderNotFoundException
PasswordEncoderFactory
getEncoder
in interface PasswordEncoderFactory
encoder
- the encoder requested, eg "ssha"PasswordEncoderNotFoundException
- if no encoder is found matching the given keypublic Set<String> getSupportedInternalEncoders()
PasswordEncoderFactory
PasswordEncoder.getKey()
getSupportedInternalEncoders
in interface PasswordEncoderFactory
public Set<String> getSupportedLdapEncoders()
PasswordEncoderFactory
PasswordEncoder.getKey()
getSupportedLdapEncoders
in interface PasswordEncoderFactory
public void addEncoder(PasswordEncoder passwordEncoder) throws PasswordEncoderException
PasswordEncoderFactory
addEncoder
in interface PasswordEncoderFactory
passwordEncoder
- the password encoder to have available in the factoryPasswordEncoderException
- if there was an issue add the encoder to the factorypublic void removeEncoder(PasswordEncoder passwordEncoder)
PasswordEncoderFactory
removeEncoder
in interface PasswordEncoderFactory
Copyright © 2020 Atlassian. All rights reserved.