You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.Could you tell me the reason of @currentuser annotation, if there is no logic implemented for that? It is like empty annotation that nothing changes?
2. Why you are autowiring AuthenticationManager to controllers? You could just add Authentication to arguments of controllers, where you need for authenticated users. And from that Authentication get user data.
3. And why you are creating redundunt login controller, if Spring Security provides that? You need just add filter method from "extends UsernamePasswordAuthenticationFilter" and override Authentication attemptAuthentication. There you are getting user and authenticate him with username and password.
The text was updated successfully, but these errors were encountered:
1.Could you tell me the reason of @currentuser annotation, if there is no logic implemented for that? It is like empty annotation that nothing changes?
2. Why you are autowiring AuthenticationManager to controllers? You could just add Authentication to arguments of controllers, where you need for authenticated users. And from that Authentication get user data.
3. And why you are creating redundunt login controller, if Spring Security provides that? You need just add filter method from "extends UsernamePasswordAuthenticationFilter" and override Authentication attemptAuthentication. There you are getting user and authenticate him with username and password.
The text was updated successfully, but these errors were encountered: