org.figure8.join.services.security
Class SimplePasswordEncoder
java.lang.Object
org.figure8.join.services.security.SimplePasswordEncoder
- All Implemented Interfaces:
- PasswordEncoder
public class SimplePasswordEncoder
- extends java.lang.Object
- implements PasswordEncoder
This is a simple implementation of PasswordEncoder
that does not apply any encoding. Don't use it in production environment,
this is only for test purposes !
- 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)
Do no encoding. |
boolean |
validatePassword(java.lang.String userId,
java.lang.String inputPassword,
java.lang.String expectedPassword)
Do basic validation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimplePasswordEncoder
public SimplePasswordEncoder()
encodePassword
public java.lang.String encodePassword(java.lang.String userId,
java.lang.String clearPassword,
java.lang.Object[] arguments)
- Do no encoding. Just return the clearPassword.
- 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)
- Do basic validation. Just ensure that inputPassword and
expectedPassword are not null and equals to each other.
- 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.