You may post here on any subjects related to this site or the software therein.
(Most everything on this site is tied into the forums so that you may leave or post comments about it.)
I'm running cf 5 and am a little confused about domain logins. The app I'm writing is inside the firewall and we authenticate with NT Domains. Can someone send me a sample of what I need to do in CF5 in order to authenticate a person's username and password against a domain and if it isn't clear, how we tell CF when someone types in their particular domain name, what to do to validate that user agains it. Thanks.
JR
JR,
there are some examples of this in the new version. This will tell you whether the logon is correct or not. Once you get past this, you will need to decide how you want to manage your sessions (variables or cookies - variables are the most secure & efficient).
- Once you mapped out your session setup, in place of the text reading "Granted" (below) you will insert your session activation query & in place of the "Denied" text you will put your code for a second login attempt - notifying the user that their logon has failed.
Hope this helps,
Shaun
This should work as long as the user accounts are in the domain as you said. Just insert this into your .cfm page
Code:
<CFX_Users ACTION="IsValid" USER="#form.user#" PASSWORD="#form.password" Domain="#domain#">
<table border=1>
<tr>
<th>User</th>
<th>IsValid</th>
</tr>
<CFIF IsDefined("Users")>
<CFIF IsQuery(Users)>
<CFLOOP QUERY="Users">
<tr>
<CFOUTPUT>
<td>#User#</td>
<td><CFIF IsValid IS "1">Granted<CFELSE>Denied</CFIF></td>
</CFOUTPUT>
</tr>
</CFLOOP>
</CFIF>
</CFIF>
</table>