I have enabled Rest support on my Spring MVC application with setting up AuthenticationEntryPoint on my security-context.xml as
AuthenticationEntryPoint