liferay / liferay-mobile-sdk

Other
47 stars 56 forks source link

Is there any way to differentiate between login failed and account locked cases. #20

Closed chetan-AD closed 8 years ago

chetan-AD commented 8 years ago

I'm unable to differentiate event "login failed" & user account is locked. We are using mobile sdk's below login function for authentication :

SignIn.signIn(session, new JSONObjectAsyncTaskCallback() { @Override public void onFailure(Exception exception) { } });

We are getting exception type "com.liferay.mobile.android.exception.AuthenticationException: java.lang.SecurityException". It is the same exception we get while user entered wrong credentials.

Is there any way to differentiate between login failed and account locked cases.

brunofarache commented 8 years ago

Unfortunately there's no way to distinguish them, @chetan-AD.

This would require a server side change and I'm not sure but it could perhaps create a security breach (is it secure to distinguish login errors? by saying an account is locked, you are saying that an account with that email exists).