0 Replies Latest reply on Oct 4, 2010 7:23 AM by drewmmd01

    Functions behind Simple Login Page?

    drewmmd01

      I apologize if this isn't the correct place to post this question, but I am unsure of the nature of the problem to know where to post. FYI, I'm not a programmer by trade or by training, but have picked up pieces here and there.

       

      The non-profit organization that I work for purchased Cisco's Show and Share and I am now tasked with attempting to create a sort of SSO with the Show and Share. I'm not familiar at all with Flex or Actionscript, so the SWF login page is new ground for me. I downloaded Sothink SWF to be able to break apart the swf to see how it works. So far, so good. When I look at the login.mxml page, I can see the field for the username and password box, and then I can see the function that sends that information (figure 1). What I need to be able to do is send credentials from a different page on a different site. I'm a bit confused though on how to do this... I've started with some basic code (figure 2) that I've used for other Form based sending of credentials (which has worked with other applications).  I'm not sure how I can figure out:

       

      1. Which page handles the form data --- should I be sending the credentials to login.mxml, login.jsp, some other page? How do I know?

      2. Can I even send the credentials via a form post as I'm trying to do in Figure 2?

       

      Any help would be greatly appreciated.

       

       

      Figure 1:

      <mx:TextInput id="userId" tabIndex="1" left="80" right="0"/>
                      <mx:TextInput id="password" tabIndex="2" displayAsPassword="true" left="80" right="0" enter="{tryLogin();}"/>
                      <mx:Button id="loginButton" tabIndex="3" left="80" click="{tryLogin();}" label="{Lang.sole().get("dms.login.button")}"/>

       

       

       

      Figure 2:

      $this->content = new stdClass;
              $this->content->text .= "\n<script type=\"text/javascript\">";
              $this->content->text .= "\nfunction submitform(){ document.testshow.submit(); }";
              $this->content->text .= "\n</script>";

       

              $this->content->text .= "<form method=\"post\" target=\"_blank\" action=\"https://media.myhost.org/vportal/login.jsp\" name=\"testshow\"><INPUT type=\"hidden\" name=\"userId\" value=\"".$USER->username."\"/><input type=\"hidden\" name=\"password\" value=\"".$dpassword."\"/><div align=\"center\"><a href=\"javascript:submitform()\"><img src=\"logo.png\" border=\"0\"></a></form>";