Authentification HTTP en VBScript / ASP Classic
<%
Application("x") = 0
dim strLogonUser, encodedData, usr, pwd, MyCon, FindList
strLogonUser = Request.ServerVariables("HTTP_AUTHORIZATION")
If (strLogonUser = "") and (application("x") = 0) Then
application("x") = 1
' Response.Buffer=true
Response.Status = "401 Unauthorized"
Response.AddHeader "WWW-Authenticate", "Basic realm=""www.osinet.fr"""
Response.Write "<p>Coucou</p><pre>"
Response.Write Request.ServerVariables ("ALL_HTTP")
%><a href="auth.asp">Boucler</a><%
Response.End
else
Response.Write "<p>OK, vous avez envoyé: <pre>" & Request.serverVariables ("ALL_HTTP")
end if
%>
<a href="auth.asp">Boucler</a>