Login

It is possible to have custom authentication with Flashcommander.

For an example check bin-release/flashcommander.php: – there are 2 things to do:

  1. create the user session: $_SESSION['flashcommander_username'] = "user";
  2. pass the gateway url in flashvars: flashvars="gateway=http://localhost/amfphp/gateway.php"

Flashcommander will skip the login screen and will assume that the “user” is logged in.

Warning: if the session is not created, you will get remote errors in Flashcommander.

6 Responses to Login

  1. Levente Peres says:

    Hi,

    Is is possible to connect authentication to MySQL? I’m more than ready to write a connector in PHP, but in that case, how would I establish the session for FC?

    Thank you sincerely,

    Levente

  2. admin says:

    Hi,

    If you want to use db authentication you need to rewrite UserConfig.php so that the remote method signatures don’t change.
    Flash sends back php session cookie the same way as a html page – in fact it uses the browser fro http calls.
    Flashcommander uses a session variable called “flashcommander_user” to athenticate the user. You need to set this in php the log in someone.

    The Flash client works like this:
    - if you pass the flashvar gateway Flash will assume that the user is logged in and it will call checkSession() on the server
    - otherwise it will display the login screen; then it will call loginUser() on the server; the passwordd is 2x encoded with MD5 before its sent:userRo.loginUser(name, MD5.hash(MD5.hash(pass)))

    Hope this helps. Good luck.

  3. Atosz says:

    Hi

    How can I change an admin and user password? I login the flashcommander admin username and admin password. When I go to the users menu and I try to change the password, it can’t do it. The password changes do not remain.
    What might be the problem?

    Thank’s for your help.

    Atosz

  4. admin says:

    If password change was successful you should receive a popup saying “You have successfully changed password.” Do you receive this?
    If not there must be an error during saving the pass, for instance it could be a permission problem on users.xml file.

  5. Atosz says:

    yes I get a message ““You have successfully changed password.”, but when I log out to the commander and I try log in again the administrator password does not change and I get this meassage “Invalid username or password!”.

  6. Atosz says:

    In meantime I fix it.
    Thank’s for your help again.

    Atosz

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">