}
private void checkSaslAuthEnabled(HttpServletRequest request)
{
boolean saslAuthEnabled = false;
HttpManagementConfiguration management = getManagementConfiguration();
if (request.isSecure())
{
saslAuthEnabled = management.isHttpsSaslAuthenticationEnabled();
}
else
{
saslAuthEnabled = management.isHttpSaslAuthenticationEnabled();
}
if (!saslAuthEnabled)
{
throw new ConnectionScopedRuntimeException("Sasl authentication disabled.");
}