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 java.lang.String ATLASSIAN_SECURITY_ENCODER
           
static java.lang.String DES_ENCODER
           
static java.lang.String MD5_ENCODER
           
static java.lang.String PLAINTEXT_ENCODER
           
static java.lang.String SHA_ENCODER
           
static java.lang.String SSHA_ENCODER
           
 
Method Summary
 void addEncoder(PasswordEncoder passwordEncoder)
          Hook to add encoders to the factory
 PasswordEncoder getEncoder(java.lang.String encoder)
          This will return an LDAP encoder for the given key.
 PasswordEncoder getInternalEncoder(java.lang.String encoder)
          This will return an Internal encoder for the given key.
 PasswordEncoder getLdapEncoder(java.lang.String encoder)
          This will return an LDAP encoder for the given key.
 java.util.Set<java.lang.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()
 java.util.Set<java.lang.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 java.lang.String DES_ENCODER
See Also:
Constant Field Values

SSHA_ENCODER

static final java.lang.String SSHA_ENCODER
See Also:
Constant Field Values

SHA_ENCODER

static final java.lang.String SHA_ENCODER
See Also:
Constant Field Values

PLAINTEXT_ENCODER

static final java.lang.String PLAINTEXT_ENCODER
See Also:
Constant Field Values

MD5_ENCODER

static final java.lang.String MD5_ENCODER
See Also:
Constant Field Values

ATLASSIAN_SECURITY_ENCODER

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

getInternalEncoder

PasswordEncoder getInternalEncoder(java.lang.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(java.lang.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(java.lang.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

java.util.Set<java.lang.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

java.util.Set<java.lang.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 © 2010 Atlassian. All Rights Reserved.