RequestHandlerInterceptor or AccessDecisionVoter which gets called first

Software Programmer
Software Programmer used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
A HandlerInterceptor should be invoked first.

Author

Commented:
Which one would be the best place to inject the granted authorities for a user ??? HandlerInterceptor or AccessDecisionVoter
Distinguished Expert 2018

Commented:
It depends where you do your authentication/authorisation.

Author

Commented:
I'm doing the authorization in the HandlerInterceptor. Is it right to do the authorization in HandlerInterceptor ?
Distinguished Expert 2018
Commented:
A handler interceptor is essentially a filter, so yes, you can do the authorisation there.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial