Improve authentication [closed]
Improve authentication [closed]
I use this code authentication:
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception
......
How I rewrite the code with Spring Security in order to get the same result?
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
1 Answer
1
You should Spring Security to manage authentication and authorization both. It seems that you have used HandlerInterceptor for it which is not recommended.
https://www.baeldung.com/spring-boot-security-autoconfiguration
Thanks, but can you show me how to implement the code with Spring Boot?
– Peter Penzov
Aug 31 at 18:43