You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2017/03/01 08:26:05 UTC

Re: How to set up a servlet to return HTTP error status instead of redirecting to the login form?

On Tue, Feb 28, 2017 at 10:17 PM, John Logan <Jo...@texture.com> wrote:
> ...The SlingAuthenticator.doLogin() method first
> calls AuthUtil.isBrowserRequest(), and if the return value is true, then
> calls AuthUtil.isAjaxRequest().  This method returns true if the following
> header is present:
>
> X-Requested-With: XMLHttpRequest ...

Ah ok, great! I had forgotten about this feature, thanks for sharing
your solution.

-Bertrand