Lapo wrote:Thanks for reporting, we'll look into this soon and let you know
String name = (String) event.getParameter(SFSEventParam.LOGIN_NAME);
String pwd = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD);
if (getApi().checkSecurePassword(session, "test", pwd)) {
trace("Password test recognized");
} else {
trace("Password test NOT recognized");
}
sfs.send(new LoginRequest("testuser", "test", zone));
11:35:33,091 INFO [SocketReader] core.SocketAcceptor - Session created: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59305 } on Server port: 9933 <---> 59305
11:35:33,211 INFO [pool-1-thread-1] Extensions - {heroesRUs}: Password test recognized
11:35:33,286 INFO [pool-1-thread-1] Extensions - {heroesRUs}: No user found with username testuser
11:35:33,286 WARN [pool-1-thread-1] managers.SFSExtensionManager - com.smartfoxserver.v2.exceptions.SFSLoginException: No user found with username testuser
11:35:57,365 INFO [Scheduler1-thread-1] sessions.DefaultSessionManager - Session removed: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59305 }
11:35:16,930 INFO [SocketReader] core.SocketAcceptor - Session created: { Id: 5, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59302 } on Server port: 9933 <---> 59302
11:35:17,200 INFO [pool-1-thread-1] Extensions - {heroesRUs}: Password test NOT recognized
11:35:17,288 INFO [pool-1-thread-1] Extensions - {heroesRUs}: No user found with username testuser
11:35:17,288 WARN [pool-1-thread-1] managers.SFSExtensionManager - com.smartfoxserver.v2.exceptions.SFSLoginException: No user found with username testuser
ThomasLund wrote:Sorry for the late reply.
No - I have not been able to reproduce this. My test code works as expected.
Here are some code snippets:
Extension:
- Code: Select all
String name = (String) event.getParameter(SFSEventParam.LOGIN_NAME);
String pwd = (String) event.getParameter(SFSEventParam.LOGIN_PASSWORD);
if (getApi().checkSecurePassword(session, "test", pwd)) {
trace("Password test recognized");
} else {
trace("Password test NOT recognized");
}
Client code:
- Code: Select all
sfs.send(new LoginRequest("testuser", "test", zone));
Server console:
- Code: Select all
11:35:33,091 INFO [SocketReader] core.SocketAcceptor - Session created: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59305 } on Server port: 9933 <---> 59305
11:35:33,211 INFO [pool-1-thread-1] Extensions - {heroesRUs}: Password test recognized
11:35:33,286 INFO [pool-1-thread-1] Extensions - {heroesRUs}: No user found with username testuser
11:35:33,286 WARN [pool-1-thread-1] managers.SFSExtensionManager - com.smartfoxserver.v2.exceptions.SFSLoginException: No user found with username testuser
11:35:57,365 INFO [Scheduler1-thread-1] sessions.DefaultSessionManager - Session removed: { Id: 6, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59305 }
If I change the password in the client to something that is not "test", then the extension correctly writes
- Code: Select all
11:35:16,930 INFO [SocketReader] core.SocketAcceptor - Session created: { Id: 5, Type: DEFAULT, Logged: No, IP: 127.0.0.1:59302 } on Server port: 9933 <---> 59302
11:35:17,200 INFO [pool-1-thread-1] Extensions - {heroesRUs}: Password test NOT recognized
11:35:17,288 INFO [pool-1-thread-1] Extensions - {heroesRUs}: No user found with username testuser
11:35:17,288 WARN [pool-1-thread-1] managers.SFSExtensionManager - com.smartfoxserver.v2.exceptions.SFSLoginException: No user found with username testuser
Can you give some more info?
/Thomas
sfs.send(new LoginRequest("testuser","test","TestZone"));if (getApi().checkSecurePassword(session, "test", encrypted_pass)){
trace("yay logged in ");
}
else {
//do failure stuff
}14:08:15,197 INFO [pool-1-thread-2] Extensions - {TestExtension}: Password does not match
14:08:15,198 WARN [pool-1-thread-2] managers.SFSExtensionManager - com.smartfoxserver.v2.exceptions.SFSLoginException: Authentication Failed
14:08:41,801 INFO [Scheduler1-thread-1] sessions.DefaultSessionManager - Session removed: { Id: 4, Type: DEFAULT, Logged: No, IP: 10.10.6.16:44611 }ThomasLund wrote:Interesting....!
What API jar did you guys use? Latest released here on the forums?
/T
Return to SFS2X Java / Android API
Users browsing this forum: No registered users and 1 guest