Saturday, September 02, 2006

LDAP authentication in website

Got a requet from a client to provide LDAP authentication in exisiting ASP website, in plain terms authenticate users using thier domain id and password. Initial thought of intergrated win auth was ruled out 'coz of Kiosk based computers used. Should make sure we SSL the page.

'ASP code
On Error Resume Next
Set dso = GetObject("LDAP:")
Set domain = dso.OpenDSObject("LDAP://", strUserName, strUserPassword, ADS_SECURE_AUTHENTICATION)
If Err.number <> 0 then
Response.Write("Invalid login. Err.number=" & Err.number)
Response.Write("Valid login. Err.number=" & Err.number)
End If
Set dso = Nothing
Set domain = Nothing

Also same functionality in 1.0

No comments: