Skip to main content
ravi_K
Participant
May 21, 2014
Question

coldfusion 10 active directory authentication through jrun.security.ntauth

  • May 21, 2014
  • 2 replies
  • 1071 views

we are using a coldfusion component to  authenticate Active directory users to give access to intranet websites, below code is working fine in development version of coldfusion 10 but when i move this to production (enterprise edition) , its not working and throwing an error message "class not found jrun.security.ntauth"


<CFFUNCTION NAME="authenticateUser" ACCESS="REMOTE" OUTPUT="yes" STATIC="yes" HINT="Authenticates the user.">
  
<CFARGUMENT NAME="userid" TYPE="string" REQUIRED="true" />
  
<CFARGUMENT NAME="passwd" TYPE="string" REQUIRED="true" />
  
<CFARGUMENT NAME="domain" TYPE="string" REQUIRED="true" />

  
<CFTRY>
  
<CFSCRIPT>
  ntauth = createObject("java", "jrun.security.NTAuth");
  ntauth.init(arguments.domain);
   ntauth.authenticateUser(arguments.userid, arguments.passwd);
  auth = true;
  
</CFSCRIPT>

  
<CFCATCH>
  
<CFSET auth = false>
  
</CFCATCH>
  
</CFTRY>

  
<CFRETURN AUTH>
  
</CFFUNCTION>



please let me know if any of you come across this kind of situation

    This topic has been closed for replies.

    2 replies

    May 22, 2014

    You could always set up a seperate JVM or point to another library location, but Carl's post looks like a better solution.

    Carl Von Stetten
    Legend
    May 21, 2014

    Are you sure you are actually running ColdFusion 10 Developer edition and not ColdFusion 9?  ColdFusion 10 doesn't run on JRUN; it uses Tomcat for the Servlet container.

    It looks like you were using undocumented (from the ColdFusion perspective) Java features to handle authentication to Active Directory.  Why not use CFLDAP instead?  Works fine for verifying users in my Windows 2003/2008R2 domain environment.

    -Carl V.