org.apache.jetspeed.security.spi
Interface AlgorithmUpgradeCredentialPasswordEncoder

All Superinterfaces:
CredentialPasswordEncoder
All Known Implementing Classes:
AlgorithmUpgradePBEPasswordService

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
 java.lang.String encode(java.lang.String userName, java.lang.String clearTextPassword, InternalCredential credential)
           
 void recodeIfNeeded(java.lang.String userName, java.lang.String clearTextPassword, InternalCredential credential)
           
 boolean usesOldEncodingAlgorithm(PasswordCredential credential)
           
 
Methods inherited from interface org.apache.jetspeed.security.spi.CredentialPasswordEncoder
encode
 

Method Detail

encode

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

recodeIfNeeded

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

usesOldEncodingAlgorithm

boolean usesOldEncodingAlgorithm(PasswordCredential credential)


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