if (BASIC_AUTH.equals(authMethod) || FORM_AUTH.equals(authMethod) ||
DIGEST_AUTH.equals(authMethod)) {
// Methods support user name and password authentication
Realm realm = context.getRealm();
Principal principal = realm.authenticate(username, password);
if (principal == null) {
throw new ServletException(
sm.getString("coyoteRequest.authFail", username));
}