最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

rest api - Wordpress HTTP API NTLM Authentication

programmeradmin1浏览0评论

I was wondering if anyone has had to use NTLM authentication when using wp_remote_get? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for different APIs that do use the Basic method, it works flawlessly!

Anyone got a solution for these?

I was wondering if anyone has had to use NTLM authentication when using wp_remote_get? Trying to authenticate using Basic but that is returning the proxy error. When I use other authenticators for different APIs that do use the Basic method, it works flawlessly!

Anyone got a solution for these?

Share Improve this question asked Oct 15, 2019 at 5:58 markbmarkb 2996 silver badges18 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

In case anyone has issues like I did, I found this discussion where I added the code and instantly was authenticated. Not sure if its a Wordpress issue or a PHP one, but I feel that the ANY portion of the Wordpress authentication was getting blocked first to find the Proxy type, but timing out. Adding the code from this link worked: https://core.trac.wordpress/ticket/31232#comment:7

add_action( 'http_api_curl', function( $handle ) {
    curl_setopt( $handle, CURLOPT_PROXYAUTH, CURLAUTH_BASIC );
});
发布评论

评论列表(0)

  1. 暂无评论