java - How does Liferay login work? -


just user jack wants in this post, need portlet uses login through token authentication.
stated there, portal-impl.jar unavailable me use, loginutil.login unaccessible.
additionally, adding functionality existing ext plugin out of question because he's waaaay 'dense', , creating 1 bad practice.
chose create own login function based on login() logic in loginutil. it's same code required portal-impl.jar's properties stored locally (upgrade newer liferay version out of question think it's ok that).
seems work fine, not logged in , no error apperas in tomcat.

now, problem can't realise piece of code logs user in.
assume it's this

        session.setattribute("j_username", useridstring);         session.setattribute("j_password", user.getpassword());         session.setattribute("j_remoteuser", useridstring);          session.setattribute(webkeys.user_password, password); 

ps : after custom login method (which repeat, has same code loginutil's login method), if put following code :

themedisplay td = (themedisplay) request.getattribute(webkeys.theme_display); user uu = td.getuser(); system.out.println("user = " + uu.getemailaddress()); 

it output user = default@liferay.com, login unsuccessful.
user logged in in code?!

pps: in portal-ext.properties, here following add-ons:

auth.pipeline.enable.liferay.check=false
session.enable.persistent.cookies=true
session.enable.phishing.protection=false
session.disabled=false
session.test.cookie.support=true

my version of liferay 5.2.3.

sorry, opinion, better , simplest way create new hook autologin funktion: how use autologin in liferay?

ps: , upgrade stable.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -