[undertow-dev] req.authenticate() problems 1.1.0
Bill Burke
bburke at redhat.com
Tue Nov 25 11:30:41 EST 2014
When upgrading from Undertow 1.0.15 to 1.1.0 our
HttpServleRequest.authenticate() unit test is failing. An exception is
being thrown in HttpServletRequestImpl.authenticate() line 416.
Our auth mechanism is being called correctly. It sets the status code
(302) and the Location header within a challenge object. It looks like
exchange.isResponseStarted() is returning false even though my challenge
object is setting up the resposne correctly. Am I supposed to call
exchange.endExchange() or something within my Challenge object? I tried
doing that, but Undertow is now spitting out exception messages:
java.lang.IllegalStateException: UT000002: The response has already been
started
at
io.undertow.server.HttpServerExchange.setResponseCode(HttpServerExchange.java:1246)
at
io.undertow.security.impl.SecurityContextImpl$ChallengeSender.transition(SecurityContextImpl.java:355)
at
io.undertow.security.impl.SecurityContextImpl$ChallengeSender.transition(SecurityContextImpl.java:349)
at
io.undertow.security.impl.SecurityContextImpl$ChallengeSender.transition(SecurityContextImpl.java:349)
at
io.undertow.security.impl.SecurityContextImpl$ChallengeSender.access$300(SecurityContextImpl.java:314)
at
io.undertow.security.impl.SecurityContextImpl.sendChallenges(SecurityContextImpl.java:135)
at
io.undertow.security.impl.SecurityContextImpl.authTransition(SecurityContextImpl.java:109)
at
io.undertow.security.impl.SecurityContextImpl.authenticate(SecurityContextImpl.java:99)
at
io.undertow.servlet.spec.HttpServletRequestImpl.authenticate(HttpServletRequestImpl.java:404)
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the undertow-dev
mailing list