FW user login to authenticate from windows active directory

Re: FW user login to authenticate from windows active directory

Postby Antonio Linares » Thu Jun 24, 2021 2:27 pm

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41318
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FW user login to authenticate from windows active directory

Postby Antonio Linares » Tue Jun 29, 2021 12:17 pm

This code from Charly, Felix and others is what we were looking for:

Code: Select all  Expand view
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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41318
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 12 guests