It is possible to have custom authentication with Flashcommander.
For an example check bin-release/flashcommander.php: – there are 2 things to do:
- create the user session:
$_SESSION['flashcommander_username'] = "user"; - 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.
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
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
gatewayFlash will assume that the user is logged in and it will callcheckSession()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.
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
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.
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!”.
In meantime I fix it.
Thank’s for your help again.
Atosz