Question
CFLDAP query - use to authenticate network user
Greeting
I have set up a successful cfldap query which will return all users in Active Directory.
If the user has logged into the network, I want them to give them a view of certain data that someone outside the network cannot access.
I tried to send the internal user through an authentication page:
<cfldap action="QUERY"
name="results"
attributes="userPrincipalName" (which is their email address)
start="dc=xxxx,dc=xxxx"
scope="SUBTREE"
filter="(&(objectCategory=user)(userPrincipalName=*))"
server="DC1.xxxx"
username="master\administrator"
password="xxxx">
This queries the AD as the admin because a second login by the user is what I am trying to avoid.
<CFIF .........?>
<cfset Session.user_id = results.userPrincipalName>
<cflocation url="switchboard.cfm" addtoken="No">
<cfelse>
<cflocation url="cannotauthenticate.cfm" addtoken="No">
</CFIF>
Is there any way to accomplish this?
Thanks
rinorman
I have set up a successful cfldap query which will return all users in Active Directory.
If the user has logged into the network, I want them to give them a view of certain data that someone outside the network cannot access.
I tried to send the internal user through an authentication page:
<cfldap action="QUERY"
name="results"
attributes="userPrincipalName" (which is their email address)
start="dc=xxxx,dc=xxxx"
scope="SUBTREE"
filter="(&(objectCategory=user)(userPrincipalName=*))"
server="DC1.xxxx"
username="master\administrator"
password="xxxx">
This queries the AD as the admin because a second login by the user is what I am trying to avoid.
<CFIF .........?>
<cfset Session.user_id = results.userPrincipalName>
<cflocation url="switchboard.cfm" addtoken="No">
<cfelse>
<cflocation url="cannotauthenticate.cfm" addtoken="No">
</CFIF>
Is there any way to accomplish this?
Thanks
rinorman
