Suppress NTLM dialog box after unauthorized request

后端 未结 3 1865
醉话见心
醉话见心 2021-01-12 12:25

In a recent sharepoint project, I implemented an authentication webpart which should replace the NTLM authentication dialog box. It works fine as long as the user provides v

3条回答
  •  清歌不尽
    2021-01-12 12:43

    IIRC, the browser pops the auth dialog when the following comes back in the request stream:

    • Http status of 401
    • WWW-Authenticate header

    I would guess that you'd need to suppress one or both of those. The easy way to do that is to have a login method that'll take a Base64 username and password (you are using HTTPS, right?) and return 200 with a valid/invalid status. Once the password has been validated, you can use it with XHR.

提交回复
热议问题