在身份验证方面,我是新手Kerberos
。
我可以通过提供用户名和密码直接从浏览器登录访问 API url。我通过启用debug
日志签入事件查看器,它给了我以下输出:
[PIWebAPI] {fd479633-2395-43f7-8fd0-8a028257d664}: Request executing as XXX\utkarsh.saraf.
GET /piwebapi
Upgrade-Insecure-Requests: 1
Connection: keep-alive
Accept: text/html, application/xhtml+xml, application/xml; q=0.9, image/webp, image/apng, */*; q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US, en; q=0.9
Authorization: Negotiate [Redacted]
Host: XX.XX.XX.XX
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
我试图通过遵循这些文章在 Java 中以编程方式实现,但对 conf 文件krb5.conf
和login.conf
这些文件中提到的文件有些困惑:
1) http://www.chrisweldon.net/sharepoint/sharepoint-rest-api-authentication-from-java/
2) https://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html
这些文件是需要我自己创建还是会出现在服务器上?