Ramesh Kotha
Ramesh Kotha

Reputation: 8322

how to get user entered password in spring security 3

I have implemented UserDetailsService and overriden loadUserByUsername(String username), here i need User entered password.

I want to authenticate against LdapTemplate authenticate(username,password). I have searched a lot but dint get it.

Please help me.

Upvotes: 0

Views: 359

Answers (1)

Pavel Horal
Pavel Horal

Reputation: 18224

Either use spring-security-ldap for LDAP based authentication or implement your own AuthenticationProvider instead of DaoAuthenticationProvider.

There are multiple authentication scenarios when using Spring Security LDAP:

  • either you can retrieve the user entry via connection authenticated by the provided credentials (probably scenario you are looking for)
  • or you can authenticate via technical account (usually you need to make LDAP search to get user's DN)

For more information check Spring Security LDAP documentation.

Upvotes: 1

Related Questions