Page 1 of 1

Strange Behavior with SFSEventParam.LOGIN_PASSWORD

Posted: 09 Oct 2011, 01:46
by sylhouette
I am quite new to SFS2X development, and I want to use this server for my Android multiplayer card game app. I created a simple LoginHandler for my Android app.

I noticed a strange behavior with the SFSEventParam.LOGIN_PASSWORD. What does exactly this SFSEventParam.LOGIN_PASSWORD do when I send a password string to it?

I tried this scenario: I always send the username a and password of 4124bca9335c27f86f24ba207a4912 to the LoginHandler. But each time I execute my program the LoginHandler sysout always shows different password each time. I need to get my password validated in my Oracle DB.

My LoginHandler snippet

Code: Select all

String username = (String) event.getParameter(SFSEventParam.LOGIN_NAME);

String password = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD);

System.out.println("username: " + username + ", password: " + password);
It gives the following sysout:

Code: Select all

username: a, password: 2977a5ab3d7594befc6bdd839a83b207

username: a, password: ab257ba4ae0dd4a5ba7b9188fd5f1959

username: a, password: 993b78067a549b0d14c0029611745e54c
I did not change the code, I simply tried to login several times. I'm confused. Anyone can help? Thank you very much [/code]

Posted: 09 Oct 2011, 10:30
by Bax
Please check step (3) of this how-to: http://docs2x.smartfoxserver.com/Gettin ... wtos#item3

Posted: 10 Oct 2011, 01:23
by sylhouette
Really thankful for the quick help :)