org.apache.jetspeed.security.spi
Interface AlgorithmUpgradeCredentialPasswordEncoder

All Superinterfaces:
CredentialPasswordEncoder

public interface AlgorithmUpgradeCredentialPasswordEncoder
extends CredentialPasswordEncoder

AlgorithmUpgradeCredentialPasswordEncoder which is provided with the InternalCredential as well to allow for migrating between two different encoding schemes.

The extended encode method is *only* called in the context of validating an existing (old) password, and not used for creating or updating to a new password directl!

After successfull authentication, the recodeIfNeeded method will be called allowing to migrate to the new encryption scheme.

Version:
$Id$
Author:
Ate Douma

Method Summary
 String encode(String userName, String clearTextPassword, InternalCredential credential)
           
 void recodeIfNeeded(String userName, String clearTextPassword, InternalCredential credential)
           
 boolean usesOldEncodingAlgorithm(PasswordCredential credential)
           
 
Methods inherited from interface org.apache.jetspeed.security.spi.CredentialPasswordEncoder
encode
 

Method Detail

encode

String encode(String userName,
              String clearTextPassword,
              InternalCredential credential)
              throws SecurityException
Throws:
SecurityException

recodeIfNeeded

void recodeIfNeeded(String userName,
                    String clearTextPassword,
                    InternalCredential credential)
                    throws SecurityException
Throws:
SecurityException

usesOldEncodingAlgorithm

boolean usesOldEncodingAlgorithm(PasswordCredential credential)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.