spring-guides / gs-authenticating-ldap

Authenticating a User with LDAP :: Learn how to secure an application with LDAP.
https://spring.io/guides/gs/authenticating-ldap/
Apache License 2.0
97 stars 154 forks source link

Missing annotation from guide #21

Closed djnoddyp closed 5 years ago

djnoddyp commented 7 years ago

In the guide @EnableWebSecurity is missing from WebSecurityConfig.java, without this the login doesn't work.

I was following the guide but mine is a an MVC app as opposed to REST, not sure if that makes any difference.

dsyer commented 6 years ago

Works for me (and Spring Boot does not require the use of @EnableWebSecurity). What is it that you see not working, and how do you know?

jzheaux commented 5 years ago

Thanks, @djnoddyp for the report! The annotation isn't necessary in a Spring Boot application, though the WebSecurityConfigurerAdapter still needs to be scanned, which is why @Configuration takes its place.

The guide certainly works, as proven by the unit tests that accompany the completed version. Are you recommending some other kind of change? If so, please feel free to open the ticket so we can make the necessary changes.