Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Login Screenlet IOS password Expired
Hi:
I'm trying to catch the exception that tell me when the password have expired, so, when I tried from the web login liferay, on the console I can see:
com.liferay.portal.kernel.exception.PasswordExpiredException but on the screenlet I always get the same exception: "Access denied to com.liferay.portal.kernel.service.UserService#getUserById", how can achive this?, to catch the PasswordExpiredException on the screenlet with the listener onLoginFailure
I'll appreciate your help
Right now the screenlet or the remote services don't authenticate like the web (because all services require authentication and there isn't a remote service to authenticate) so it's not executing the checkPasswordExpired code (it just receives an invalid password).
I think the best way would be exposing one of the local services that check for password expiration (like checkPasswordExpired in UserLocalService) to the UserService and using the remote JSON-WS. That means just adding one row to a service.xml, and call that service before doing login/with a custom interactor.
thank you so much, I guess i'll do it like you suggest it.
UserLocalServiceUtil.isPasswordExpired(user);
Powered by Liferay™