Is there any package/documentation/sample code available to call a http request using NTLM authentication in Laravel.
I tried to the below was to first authenticate and then send the NTLM token from response header and call the request again.
$response = Http::withHeaders([
"Host" => $my_host_name,
"Connection" => "keep-alive",
"Authorization" => "NTLM TlRMTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
])->get($MY_URL);
$authKey = $response->header('WWW-Authenticate');
$response = Http::withHeaders([
"Host" => $my_host_name,
"Connection" => "keep-alive",
"Authorization" => $authKey,
"Cache-Control" => "no-cache"
])->get($MY_URL);
dd($response);
Getting a 400 Bad Request error.
source https://stackoverflow.com/questions/68975886/laravel-http-request-with-ntlm-auth
Comments
Post a Comment