I am trying to access a web service on a server that requires windows authentification.
These are the steps I'm trying to take.

1. Use script below to do window auth.

<cfscript>
  objNTAuth = createObject("java", "jrun.security.NTAuth");
  objNTAuth.init("Name_of_Domain");
  objNTAuth.authenticateUser("userid","password");
</cfscript>

2. Then invoke my call to the web service.

I am having trouble with the windows auth part.
I have been given a username of "ABC\DEFGHI" and a password
Am I correct that the domain name is "ABC" and the username would be "DEFGHI".
If so... I don't understand how my script can access the domain.
Would the domain not have to have a url of some sort so that it knows where the server is?
Am I missing some understanding of this?

Any hints or explanations would be helpful.
Thanks

Use CFLDAP tag provide required attriburts deatils

urCFm.cfm
-----------
<cfinvoke method="fnAuthenticateUser" returnvariable="webServiceResult" webservice="path of ur cfc ">
<cfinvokeargument name="UserName" value="#trim(form.frmUsername)#">
<cfinvokeargument name="Password" value="#trim(form.frmPassword)#">
</cfinvoke>

urCFC.cfc
----------

<cffunction name="fnAuthenticateUser" access="remote" returntype="string" output="no" securejson="true" returnformat="json"
hint="The function conditionaly validates the user credentials" description="returns the user details in serialize format">

<cfargument name="lUserName" type="string" required="no" default="">
<cfargument name="lPassword" type="string" required="no" default="">

<cfldap provide requied attributes >
do ur logic stuff here

<cfreturn UserInfo>

</cffunction>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.