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