Foren
Get Loggedin User's plainText Password
biswajit sarkar, geändert vor 11 Jahren.
Get Loggedin User's plainText Password
Regular Member Beiträge: 166 Beitrittsdatum: 17.10.11 Neueste Beiträge
I am trying to get plain test password of a loggedin user.
In lots of thread i find below solution
set thies in portal-ext
and also try to get the password from session using this code
But it always retun null.
does anyone have any solution??
I am using jsf to create my portlet
In lots of thread i find below solution
set thies in portal-ext
session.store.password=true
session.shared.attributes.excludes=
and also try to get the password from session using this code
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext externalContext = fc.getExternalContext();
PortletRequest req = (PortletRequest) fc.getExternalContext().getRequest();
PortletSession ps = req.getPortletSession();
System.out.println(ps.getAttribute("USER_PASSWORD"));
But it always retun null.
does anyone have any solution??
I am using jsf to create my portlet
Apoorva Prakash, geändert vor 11 Jahren.
RE: Get Loggedin User's plainText Password
Liferay Master Beiträge: 658 Beitrittsdatum: 15.06.10 Neueste Beiträgebiswajit sarkar:
I am trying to get plain test password of a loggedin user.
In lots of thread i find below solution
set thies in portal-extsession.store.password=true session.shared.attributes.excludes=
and also try to get the password from session using this codeFacesContext fc = FacesContext.getCurrentInstance(); ExternalContext externalContext = fc.getExternalContext(); PortletRequest req = (PortletRequest) fc.getExternalContext().getRequest(); PortletSession ps = req.getPortletSession(); System.out.println(ps.getAttribute("USER_PASSWORD"));
But it always retun null.
does anyone have any solution??
I am using jsf to create my portlet
Hello Bishwajeet,
You cannot decode the password stored by Liferay, because it use SHA algorithm by default, which is irreversible.
But you can use one of the following properties in your portal-ext.properties for overriding the default settings. You'll need to set NONE if you don't want to encode the password.
#
# Set the following encryption algorithm to encrypt passwords. The default
# algorithm is SHA (SHA-1). If set to NONE, passwords are stored in the
# database as plain text. The SHA-512 algorithm is currently unsupported.
#
#passwords.encryption.algorithm=BCRYPT
#passwords.encryption.algorithm=UFC-CRYPT
#passwords.encryption.algorithm=MD2
#passwords.encryption.algorithm=MD5
#passwords.encryption.algorithm=NONE
passwords.encryption.algorithm=SHA
#passwords.encryption.algorithm=SHA-256
#passwords.encryption.algorithm=SHA-384
#passwords.encryption.algorithm=SSHA
HTH.
Thanks and Regards,
Apoorva Prakash