RequestHandlerInterceptor or AccessDecisionVoter which gets called first

RequestHandlerInterceptor or AccessDecisionVoter which gets called first

I'm working on spring boot application and would like to know RequestHandlerInterceptor or AccessDecisionVoter which gets invoked first
Software ProgrammerAsked:
Who is Participating?
 
girionisCommented:
A handler interceptor is essentially a filter, so yes, you can do the authorisation there.
0
 
girionisCommented:
A HandlerInterceptor should be invoked first.
0
 
Software ProgrammerAuthor Commented:
Which one would be the best place to inject the granted authorities for a user ??? HandlerInterceptor or AccessDecisionVoter
0
 
girionisCommented:
It depends where you do your authentication/authorisation.
0
 
Software ProgrammerAuthor Commented:
I'm doing the authorization in the HandlerInterceptor. Is it right to do the authorization in HandlerInterceptor ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.