My understanding of the way this ought to work...

1) First failing AuthFilter throws a WebApplicationException; delegating to 
its UnauthorizedHandler construction of the Response
2) Last(??) matched ExceptionMapper finalizes the response to the client 
(maybe--documentation on Jersey ExceptionMapper handling eludes me)

io.dropwizard.jersey.errors.LoggingExceptionMapper appears to 
support redirection for 3xx-family WebApplicationExceptions.  A custom 
UnauthorizedHandler ought to be able to create this--although it seems 
awkward to do so from the "prefix" and "realm" arguments demanded by the 
functional interface.

On Monday, November 21, 2016 at 2:37:47 PM UTC-5, Joe Mifsud wrote:
>
> Hi there,
>
> I'm attempting to redirect a user to a different page inside of an 
> UnauthorizedHandler when they are not logged in.  My understanding is that 
> you cannot actually redirect by throwing a WebApplicationException and this 
> in fact does not work when I try to issue a Response with a location 
> header.  How can I force a redirect from the UnauthorizedHandler?
>
> Thanks for your time,
> Joe Mifsud
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to