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

Bill Burke bburke at redhat.com
Fri Nov 20 19:56:34 EST 2015


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


More information about the undertow-dev mailing list