views:

53

answers:

2

hi my login.jsp i have j_username ,j_password, this will call my UserDetailsServiceImpl.loadUserByUsername(string username) , how to authenticate the password ?

+1  A: 

This might help

org.life.java
+2  A: 

You don't authenticate the password yourself, Spring Security compares the UserDetails object you return from loadUserByUsername() (which contains a password field) with the credentials presented by the user.

This allows the authentication logic to be abstracted away and not handled in code, for example if you want to change to using hashes, salts, etc.

matt b