Compare Liferay's encrypted passwords and user input

旧街凉风 提交于 2020-01-06 11:50:08

问题


I'm working on an application that shows information stored on a Liferay database. For doing that I made a web service, using Java, that reads data from the database. All queries are going well but I need a login section. The issue is that the password is encrypted and I don't know how to compare the password given by the user and the passwords I have in the database, that are encrypted.

EDIT: passwords.encryption.algorithm has the default value: PBKDF2WithHmacSHA1/160/128000

Any suggestion?


回答1:


There's a utility class for password comparison.

PasswordTrackerLocalServiceUtil#isSameAsCurrentPassword(userId, newClearTextPwd)



来源:https://stackoverflow.com/questions/33101594/compare-liferays-encrypted-passwords-and-user-input

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!