info.joseluismartin.auth
Class AuthPlain

java.lang.Object
  extended by info.joseluismartin.auth.AuthPlain
All Implemented Interfaces:
AuthStrategy

public class AuthPlain
extends Object
implements AuthStrategy

An Auth Strategy that use plain passwords.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Constructor Summary
AuthPlain()
           
 
Method Summary
 String crypt(String suppliedPassword)
          Crypt a password
 boolean validate(String suppliedPassword, String userPassword)
          Compare supplied password wiht stored user password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthPlain

public AuthPlain()
Method Detail

validate

public boolean validate(String suppliedPassword,
                        String userPassword)
Compare supplied password wiht stored user password

Specified by:
validate in interface AuthStrategy
Parameters:
suppliedPassword - the supplied password
userPassword - the user password
Returns:
true if both passwords are equals and not null

crypt

public String crypt(String suppliedPassword)
Description copied from interface: AuthStrategy
Crypt a password

Specified by:
crypt in interface AuthStrategy
Returns:
crypted passord


Copyright © 2012 JDAL. All Rights Reserved.