How do you perform a Guzzle POST request with "Basic Auth" for the current user?
You were so close  main thing here is the "Authorization" Header ...

 $current_user = \Drupal::currentUser();
 $account = $current_user-&gt;getAccount();

 $username = $account-&gt;name;
 // pass would be hard to get as stored hashed 
 //... so you would need to get a bit tricky to "catch" the users password when they log in... 
 $pass = 'admin';
 $auth = 'Basic '. base64_encode ($username . ':' . $pass);
 $rest_response = $client-&gt;post($endpoint, [
   'body' =&gt; $serialized_entity,
   'headers' =&gt; [
     'Authorization' =&gt; $auth,
     'Content-Type' =&gt; 'application/hal+json',
     'X-CSRF-Token' =&gt; $token,
  ],
]);


And just for fun:

  var basicAuthCredential = username + ":" + password;
  var bace64 =  btoa(basicAuthCredential);
  var Auth =  'Basic ' + bace64;
  fetch(url,{
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
      'Authorization': Auth,
      'X-CSRF-Token': token
    },
    body: JSON.stringify(data)
}).then(response =&gt; response.json())...