I am trying to recreate an active directory authentication servlet. (Through change of company, we didn't get the source code for the servlet. But our apps still look for the servlet for user authentication.) The servlet is called from my application. According to the design doc, "the servlet will return the result as an HTTP response. The response will have up to 3 lines after the HTTP header. 1st line: numeric constant representing a customized return code. 2nd line: return message." (3rd line is irrelevant). Another design doc refers to the returned data as "Lines Displayed by Servlet": Line 1 = Return code, Line 2 = Return message. "Value of Displayed Lines": Line 1= 0, Line 2 = Authentication Successful.
One of my apps is in Cold Fusion. Here is how it wants to see the servlet response:
<cftry>
<cf_authenticate_admin userID="#userID#" userPassword="#userPassword#">
<!--- Custom tag sets CALLER scope variables below --->
<cfset returnCode=codeValue>
<cfset returnMessage=messageValue>
<cfif returnCode eq 13>
<cfset isAdminAuthenticated=True>
<cfelse>
<cfset isAdminAuthenticated=False>
</cfif>
<cfcatch type="any">
<cfoutput>#CFCATCH.message#</cfoutput>
</cfcatch>
</cftry>
Can someone please help me match these two up? I have a servlet that performs the authentication, but can't figure out how to get my response in the right format. If someone could help wtih an example response, it would sure bail me out. Thank you!!!