org.figure8.join.services.security
Class MD5PasswordEncoder

java.lang.Object
  extended by org.figure8.join.services.security.MD5PasswordEncoder
All Implemented Interfaces:
PasswordEncoder

public class MD5PasswordEncoder
extends java.lang.Object
implements PasswordEncoder

Implementation of PasswordEncoder using a MD5 digest.

Version:
$Revision: 1.1 $
Author:
Jerome Evrard

Constructor Summary
MD5PasswordEncoder()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MD5PasswordEncoder

public MD5PasswordEncoder()
Method Detail

encodePassword

public 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.

Specified by:
encodePassword in interface PasswordEncoder
Parameters:
userId - The user identifier
clearPassword - The non encoded password of the user
arguments - Arguments for encoding process
Returns:
the encoded password.

validatePassword

public 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.

Specified by:
validatePassword in interface PasswordEncoder
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.