Sharepoint access using perl and webdav

A similar question was asked in question 494120 , but IMHO did not receive an answer ...

I want to upload files to sharepoint using perl / WebDAV (from a Win32 host). To achieve this, I need to authenticate with KERBEROS on the server. After a long search on the Internet and trying different approaches, I can’t open the connection. Current Code:

my $agent = HTTP::DAV::UserAgent->new(keep_alive=>1);  
$agent->agent('Agent');  
$agent->timeout(1000);  
my $d = HTTP::DAV->new(-useragent => $agent);  
$d->credentials( -user=>$user,-pass =>$pass, -url =>$url);  
$d->open( -url=>$url ) or die("Couldn't open $url: " .$d->message . "\n");  

When doing $ d-> open (...), I always get: "Could not open $ url: Unauthorized. Negotiate." So, it is obvious that basic authentication does not work.

Can someone point me in the right path please? I am not tied to using WebDAV, any other mechanism will suit me. I just want it to work ...


Edit 1
When used LWPtogether with Authen::NTLM(as suggested by Madhur ) also does not work. This results 500 internal server errorin IIS as well as Apache. Since the same error occurs on two different web servers (with two different NTLM implementations), I assume that the problem should be in the module Authen::NTLM.

Looking at the implementation Authen::NTLM , it seems to me that the code has a reverse construction and is not implemented based on the specification, nor is it really customizable. Which begs the question why the specification was not used to implement the module ...

Does NTLM and Perl use such an exotic use case?


2
Madhur, Sharepoint Curl. . , NTLM Curl, , Perl, , - .

+3

Source: https://habr.com/ru/post/1776884/


All Articles