In that case, the DelegatingAuthenticationEntryPoint configuration I posted should be applied to this configuration. Essentially what is going to happen is you can say in some instances redirect to a login form and in other instances use a custom entry point that you wrote (i.e. your restAuthenticationEntryPoint).
Two <http> container elements with one for the browser and one for REST Page Title Module
Move Remove Collapse