org.figure8.join.services.security
Interface PasswordEncoder

All Known Implementing Classes:
CryptPasswordEncoder, MD5PasswordEncoder, SimplePasswordEncoder

public interface PasswordEncoder

This interface allows Join system deployer to provide their own password encoding and validation methods for the Join application.

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Method Summary
 java.lang.String encodePassword(java.lang.String userId, java.lang.String clearPassword, java.lang.Object[] arguments)
          A hook that allows implementation to provide custom password encoding method using a set of arguments.
 boolean validatePassword(java.lang.String userId, java.lang.String inputPassword, java.lang.String expectedPassword)
          A hook that allows implementation to change the validation of the input password against the expected password.
 

Method Detail

encodePassword

java.lang.String encodePassword(java.lang.String userId,
                                java.lang.String clearPassword,
                                java.lang.Object[] arguments)
A hook that allows implementation to provide custom password encoding method using a set of arguments.

Parameters:
userId - The user identifier
clearPassword - The non encoded password of the user
arguments - Arguments for encoding process
Returns:
the encoded password.

validatePassword

boolean validatePassword(java.lang.String userId,
                         java.lang.String inputPassword,
                         java.lang.String expectedPassword)
A hook that allows implementation to change the validation of the input password against the expected password.

Parameters:
userId - The user identifier
inputPassword - The password provided by the user
expectedPassword - The real user's pasword
Returns:
true if the inputPassword is valid, false otherwise.


Copyright © 2005-2008 Join. All Rights Reserved.