>>194
uses に IdContext を手動で追加 (何故か自動では追加されないらしい)

procedure TForm1.IdHTTPServer1CommandGet(AContext: TIdContext;
 ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
begin
 if (ARequestInfo.AuthExists = True) and
   (ARequestInfo.AuthUsername = 'username') and
   (ArequestInfo.AuthPassword = 'password') then
 begin
  // Auth OK
  // AResponseInfo.ResponseNo := 200;
 end else
 begin
  // Auth NG
  // AResponseInfo.ResponseNo := 401;
  AResponseInfo.AuthRealm := 'input username and password'
 end;
end;

Indy10 しか使ったことないので、Indy9 ではどうなのか分かんないけど。