I also had a similar problem, and I realized that if you use Wildfly, then you can configure several mechanisms using web.xml: -
<auth-method>BASIC?silent=true,FORM</auth-method>
First, this silent basic authentication is used, which is basic authentication, which only takes effect when there is an authorization header. If there is no such header, form authentication will be used instead.
It may be too late for an answer, but I just updated this if someone finds this useful: P
nothingInTheName
source share