Fórum
Simple SSO using OpenIdAutoLogin : sharing attribute in session ?
Nicolas BODIN, modificado 16 Anos atrás.
Simple SSO using OpenIdAutoLogin : sharing attribute in session ?
New Member Postagens: 13 Data de Entrada: 29/11/07 Postagens Recentes
I am almost succeeding in my simple AutoLogin :
I wanted to avoid CAS autoLogin which was rather complex to what I am expecting to do and which would require to modify my portlet application (I am writing a portlet over existing web applications).
I am connected to one of my web application -a WAR file- (which contains some portlets but non only).
I am logged in and I want to force an autologin in the liferay portal (open the liferay portal view inside my existing app).
I know :
- that the user is successfully logged in,
- his liferay portal user id.
I tried the following :
1) I Store in the Portlet HttpSession the following attribute :
2) In portal-ext properties I have added :
3) I am expecting that com.liferay.portal.security.auth.OpenIdAutoLogin can get my login Id back.
Problem : the session.setAttribute("OPEN_ID_LOGIN", new Long(theId)); is not shared to the portal : it seems
that even if I add :
session.shared.attributes=OPEN_ID_LOGIN
this is enable the sharing from the portal to the webapps (WAR) of the portlets but not the other way ?
Any Idea to get this value in liferay portal ?
Otherwise the only idea I have is to write my own implementation of com.liferay.portal.security.auth.OpenIdAutoLogin and pass some security as parameters of the request through a POST
Thanks if anyone has an Idea of the way I can share at least one session Attribute (maybe a naming rule of the key ?)
Best regards
Nicolas
I wanted to avoid CAS autoLogin which was rather complex to what I am expecting to do and which would require to modify my portlet application (I am writing a portlet over existing web applications).
I am connected to one of my web application -a WAR file- (which contains some portlets but non only).
I am logged in and I want to force an autologin in the liferay portal (open the liferay portal view inside my existing app).
I know :
- that the user is successfully logged in,
- his liferay portal user id.
I tried the following :
1) I Store in the Portlet HttpSession the following attribute :
session.setAttribute("OPEN_ID_LOGIN", new Long(theId));
2) In portal-ext properties I have added :
auto.login.hooks=com.liferay.portal.security.auth.OpenIdAutoLogin
session.shared.attributes=OPEN_ID_LOGIN
3) I am expecting that com.liferay.portal.security.auth.OpenIdAutoLogin can get my login Id back.
Problem : the session.setAttribute("OPEN_ID_LOGIN", new Long(theId)); is not shared to the portal : it seems
that even if I add :
session.shared.attributes=OPEN_ID_LOGIN
this is enable the sharing from the portal to the webapps (WAR) of the portlets but not the other way ?
Any Idea to get this value in liferay portal ?
Otherwise the only idea I have is to write my own implementation of com.liferay.portal.security.auth.OpenIdAutoLogin and pass some security as parameters of the request through a POST
Thanks if anyone has an Idea of the way I can share at least one session Attribute (maybe a naming rule of the key ?)
Best regards
Nicolas
Koen Cleynhens, modificado 13 Anos atrás.
RE: Simple SSO using OpenIdAutoLogin : sharing attribute in session ?
Junior Member Postagens: 83 Data de Entrada: 23/02/10 Postagens Recentes
Did you find a solution for this one?
Nicolas BODIN, modificado 13 Anos atrás.
RE: Simple SSO using OpenIdAutoLogin : sharing attribute in session ?
New Member Postagens: 13 Data de Entrada: 29/11/07 Postagens Recentes
In fact I find a way do do an autologin but this was clearly not a clean way, since i had to write my own code to override Liferay's autologin.
Since then I am no longer using the portal, but if you are interested I just provide you the code samples I wrote (I had to autolog and also to create the account if does not exists).
Best regards
Since then I am no longer using the portal, but if you are interested I just provide you the code samples I wrote (I had to autolog and also to create the account if does not exists).
Best regards