[WFLY-1594] Detect if BASIC authentication is in use and adjust responses accordingly.