[undertow-dev] way to call sendError within AuthMech?

arjan tijms arjan.tijms at gmail.com
Sat Nov 21 11:16:24 EST 2015


Perhaps a coincidence, but it's pretty much the same error as reported
here: https://issues.jboss.org/browse/UNDERTOW-577

And the same error that makes it impossible to call sendError in an
authentication module (where there's no such thing as encapsulating within
a challenge).

The fix has solved those 2 issues, but it's not yet available in a released
(or nightly) WildFly build afaik.



On Sat, Nov 21, 2015 at 2:02 AM, Bill Burke <bburke at redhat.com> wrote:

> Meh, nevermind...Just gotta encapsulate the call within a challenge.
>
> On 11/20/2015 7:56 PM, Bill Burke wrote:
> > Is there a way to call HttpServletResponse.sendError() within a
> > AuthenticationMechanism?  I'm getting the following after calling
> > sendError and returning AuthenticationMechanismOutcome.NOT_AUTHENTICATED
> >
> >
> > java.lang.IllegalStateException: UT010019: Response already commited
> >       at
> >
> io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:124)
> >       at
> >
> io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:167)
> >       at
> >
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:61)
> >       at
> >
> io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
> >       at
> >
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> >       at
> >
> io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
> >       at
> >
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
> >
> >
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/undertow-dev/attachments/20151121/5aec37fe/attachment.html 


More information about the undertow-dev mailing list