cometta
cometta

Reputation: 35689

Spring form get password entered

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

Upvotes: 1

Views: 1768

Answers (1)

matt b
matt b

Reputation: 139931

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.

Upvotes: 5

Related Questions