$.ajax() username/password - how to capture them

$.ajax() username/password - how to capture them

According to jQuery.Ajax, it includes a username and password attribute with the $.ajax call.

  1. $.ajax({
  2.             url: '<some-file.php>',
  3.             type: 'POST',
  4.             username: <my-username>,
  5.             password: <my-password>,
  6.             data: {code:<some-code>},
  7.             success: function(data){
  8.                
  9.             }
  10.         });

Here I have passed my username and password to <some-file.php>. And in <some-file.php>, I need to capture those username and password.

I tried $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'], but shown Notice: Undefined index: PHP_AUTH_USER and PHP_AUTH_PW

I checked $_REQUEST also, but unable to capture.

Please need your help ?