Is this code what we are looking for ?
https://wightideas.org/2014/06/25/excel-ldap-authentication/
We could easily adapt it to Harbour and FWH
FW user login to authenticate from windows active directory
- Antonio Linares
- Site Admin
- Posts: 42529
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42529
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 77 times
- Contact:
Re: FW user login to authenticate from windows active directory
This code from Charly, Felix and others is what we were looking for:
Code: Select all | Expand
FUNCTION ConectaLDAP()
LOCAL lOk := FALSE
TRY
// Creamos el objeto ADO de conexión
oConexion:= TOleAuto():new( "ADODB.Connection" )
oConexion:Provider:= 'ADsDSOObject'
oProperties := oConexion:Properties( 'User ID' )
oProperties:value := 'Your User'
oProperties := oConexion:Properties( 'Password' )
oProperties:value := 'Your Password'
oProperties := oConexion:Properties( 'Encrypt Password' )
oProperties:value := TRUE
// Abrimos la conexión
oConexion:Open( "Active Directory Provider" )
lOk := TRUE
CATCH oError
AdoError( oError, lMessage )
//xBrowse( oError )
END
RETURN lOk