I need Simple NT Authentication in FLEX

Dear Experts,

I'm just a new baby in flex programming. i need simple authentication using flex webservice using coldfusion cfc. if authenticated alert says yes not as no

<cfcomponent hint="All Validation">
<cffunction name="identifyuser"
 hint="accepts username" returntype="boolean" access="remote">
 <cfargument name="username" type="string" required="yes">
 <cfargument name="password" type="string" required="yes">
 <cfNTauthenticate username="#username#"
password="#password#" domain="kfh" result="authResult" listGroups = "yes"     throwOnError = "no">  
<cfif authResult.auth eq 'YES'>
  <cfset valid="true">
   <cfset valid="false">
<cfreturn valid>


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
            backgroundGradientColors="[#808080, #ffffff]" backgroundImage="assets/top-bg-x.jpg" top="5" right="5" bottom="5" left="5" styleName="plain">

            import mx.controls.Alert;
            import mx.rpc.events.ResultEvent;
            import mx.rpc.events.FaultEvent;
            import mx.utils.ObjectUtil;
private function validation_fault(evt:FaultEvent):void {
private function validation_result(evt:ResultEvent):void {

private function button_click():void {


<mx:WebService id="webService"
        <mx:operation name="identifyuser" resultFormat="object"

      <mx:Panel width="250" height="200" layout="absolute" horizontalCenter="-0" verticalCenter="-2" id="login" title="Login">
            <mx:TextInput x="35" y="36" id="username" maxChars="20" displayAsPassword="false" editable="true" enabled="true"/>
            <mx:TextInput x="35" y="79" id="password" maxChars="20" displayAsPassword="true" editable="true" enabled="true"/>
            <mx:Label x="35" y="16" text="User Name"/>
            <mx:Label x="35" y="59" text="Password"/>
            <mx:Button x="82" y="109" label="Login" id="Submit" labelPlacement="right" click="button_click();"/>

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

@faisalmohi - I'm not a flash expert. But it'd help  those that are if you explained what the code is doing wrong.  

Also, be sure to test your CFC in CF first. No point calling it from Flex unless it actually works as expected in CF.

Good Luck!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Is very weird you accept an answer #36907199

What exactly helped to you?

Also, be sure to test your CFC in CF first. No point calling it from Flex unless it actually works as expected in CF.


Good Luck!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.