0

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

2
Contributors
3
Replies
6
Views
6 Years
Discussion Span
Last Post by kha_tsn
0

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>

Edited by kha_tsn: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.