org.figure8.join.services.security
Class CryptPasswordEncoder
java.lang.Object
org.figure8.join.services.security.CryptPasswordEncoder
- All Implemented Interfaces:
- PasswordEncoder
public class CryptPasswordEncoder
- extends java.lang.Object
- implements PasswordEncoder
Implementation of PasswordChecker using the standard Unix encryption
mechanism for encoding and validating passwords.
- Version:
- $Revision: 1.1 $
- 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CryptPasswordEncoder
public CryptPasswordEncoder()
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 identifierclearPassword
- The non encoded password of the userarguments
- 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 identifierinputPassword
- The password provided by the userexpectedPassword
- The real user's pasword
- Returns:
- true if the inputPassword is valid, false otherwise.
Copyright © 2005-2008 Join. All Rights Reserved.