Use Windows authentication as login credentials for intranet applications

前端 未结 2 2294
感动是毒
感动是毒 2021-02-06 14:39

I\'m working on an intranet web application in PHP. Im trying to use Windows NT login credentials to logon to the application. The trouble im having here is how do i get the rem

2条回答
  •  深忆病人
    2021-02-06 14:52

    You have to send the NTLM-Authenticate headers first. After that, there should be the right user in the $_SERVER-Vars

    header('WWW-Authenticate: NTLM');
    echo $_SERVER['AUTH_USER'];
    

    AFAIK this only works in InternetExporer - browsers

提交回复
热议问题