info.joseluismartin.auth
Interface AuthStrategy

All Known Implementing Classes:
AuthHashMD5, AuthPlain

public interface AuthStrategy

Strategy for validate user supplied passords with user stored passwords

Author:
Jose Luis Martin - (jlm@joseluismartin.info)
See Also:
AuthPlain, AuthHashMD5, AuthManager

Method Summary
 String crypt(String suppliedPassword)
          Crypt a password
 boolean validate(String suppliedPassword, String userPassword)
          Validate password.
 

Method Detail

validate

boolean validate(String suppliedPassword,
                 String userPassword)
Validate password.

Parameters:
suppliedPassword - supplied password
userPassword - user password
Returns:
true if password match.

crypt

String crypt(String suppliedPassword)
             throws NoSuchAlgorithmException
Crypt a password

Parameters:
suppliedPassword -
Returns:
crypted passord
Throws:
NoSuchAlgorithmException


Copyright © 2012 JDAL. All Rights Reserved.