By theHuston on
Hey hey, hows it going...
So Ive got this sweet flash header and I want to do away with the login block all together and just send variables to the php login from flash..
Ive got some ideas about how to do this but how can I do it securly?
I have some experience with Flash AS2 and just starting to get AS3..
HUGE thanks, if anybody has any information.
Comments
Probably easiest if the
Probably easiest if the login form is generated as normal by Drupal and is present in the page source but set display: none in CSS. Then you can POST username/password as if typed into the form fields and the Log in button clicked. You will probably also need to include the form_id field in the POST. Have a look at the HTML source for the login block.
Doing it in this way Drupal's Form API will be able to handle the POST easily since it will correspond to the form present on the page.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
I was thinking about doing
I was thinking about doing somthing to that effect, but I am really worried about sending a username and a password through POST.
I have been looking at the XMLRPC.. I have downloaded a AS2 package and a couple of examples..
but I have yet to get one Flash example to even respond to the flash..
http://drupal.org/node/82114 is where I got the examples.
http://sourceforge.net/projects/xmlrpcflash is the package I am using.
http://www.creativity-meets-technology.de/projects/drupal_XMLRPC_interfa... is the example I am trying to get working.
I have:
Permissons set for Services Module
Usid set, but is an empty string in Flash.
API key set... and in my Flash file..
I am localhost so the route is http://localhost/xmlrpc.php
I am planning on using Flex as an Admin section for creating/editing/deleting Drupal Nodes later.... on for certin User Roles. But thats later.
Thanks for the input, I am worried about security mostly....
Chris Huston
theHuston.com
AS2 ....? my 2 cents, use
AS2 ....?
my 2 cents, use AS3!
>sending a username and a
>sending a username and a password through POST.
Or send it over https://
I've no experience of doing that though.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Figured it Out.
I ended up sending the variables through http.. I just needed to figure out which variables it needed with the login..
Here is the Actionscript 2 Function I used.
replace localhost with your server address.
Anybody happen to know...
Why doesnt this also work in Drupal 6.9?
It worked fine in Drupal 5.
Of course now Ive tried.
the XXX's are some crazy hash that showed up in the form details with name form_build_id.
Do I have to get the form_build_id from drupal and send it to flash through flashvars... and then send it to the address when logging in?
How do I get the form_build_id?
Thanks for any kind of input.
Chris Huston
theHuston.com