com.atlassian.crowd.password.factory
Interface PasswordEncoderFactory

All Known Implementing Classes:
AtlassianSHA1PasswordEncoderFactory, 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
static String ATLASSIAN_SECURITY_ENCODER
           
static String DES_ENCODER
           
static String MD5_ENCODER
           
static String PLAINTEXT_ENCODER
           
static String SHA_ENCODER
           
static String SSHA_ENCODER
           
 
Method Summary
 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
 

Field Detail

DES_ENCODER

static final String DES_ENCODER
See Also:
Constant Field Values

SSHA_ENCODER

static final String SSHA_ENCODER
See Also:
Constant Field Values

SHA_ENCODER

static final String SHA_ENCODER
See Also:
Constant Field Values

PLAINTEXT_ENCODER

static final String PLAINTEXT_ENCODER
See Also:
Constant Field Values

MD5_ENCODER

static final String MD5_ENCODER
See Also:
Constant Field Values

ATLASSIAN_SECURITY_ENCODER

static final String ATLASSIAN_SECURITY_ENCODER
See Also:
Constant Field Values
Method Detail

getInternalEncoder

PasswordEncoder getInternalEncoder(String encoder)
                                   throws PasswordEncoderNotFoundException
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

PasswordEncoder getLdapEncoder(String encoder)
                               throws PasswordEncoderNotFoundException
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

PasswordEncoder getEncoder(String encoder)
                           throws PasswordEncoderNotFoundException
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

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()

Returns:
Set's of supported encoders

getSupportedLdapEncoders

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()

Returns:
Set of supported encoders

addEncoder

void addEncoder(PasswordEncoder passwordEncoder)
                throws PasswordEncoderException
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

void removeEncoder(PasswordEncoder passwordEncoder)
Will remove a given encoder from the available encoders in the PasswordEncoder factory

Parameters:
passwordEncoder -


Copyright © 2013 Atlassian. All Rights Reserved.