Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Samir Issa
After Logout redirect to Http
7 mars 2012 13:11
Réponse

Samir Issa

Rang: New Member

Publications: 15

Date d'inscription: 1 avril 2011

Publications Récentes

Hi ,

i´m trying redirect toimcat to http , after logout , i´m using Tomcat 7.0.19 with Liferay Portal Community Edition 6.0.6 CE and jdk 1.6.0.26.

My redirect to HTTPS is ok , i`m using :

company.security.auth.requires.https=true
web.server.https.port=443
web.server.http.port=80

and in web.xml


<security-constraint>
<web-resource-collection>
<web-resource-name>Login</web-resource-name>
<url-pattern>/my-portal</url-pattern> <--- ITs my page to login
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Home</web-resource-name>
<url-pattern>/home</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>

In server.xml :


<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" URIEncoding="UTF-8" />

<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="goku2008" URIEncoding="UTF-8"/>



_____________________________________________________________


Now i need what Tomcat return to HTTP to after logout !!


Thanks anybody for help !!
David H Nebinger
RE: After Logout redirect to Http
7 mars 2012 21:05
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 11046

Date d'inscription: 1 septembre 2006

Publications Récentes

You can use a logout.events.post handler to do a redirect on logout.
Samir Issa
RE: After Logout redirect to Http
8 mars 2012 04:27
Réponse

Samir Issa

Rang: New Member

Publications: 15

Date d'inscription: 1 avril 2011

Publications Récentes

Ok ,


i tried default.logout.page.path = http://www.XXX.com and others path , but no redirect in some cases and in other the https was still there .


You are talk about devolper a custom action to logout.events.post=com.liferay.portal.events.LogoutPostAction ????

and how can i do that ??


thanks !
David H Nebinger
RE: After Logout redirect to Http
8 mars 2012 05:08
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 11046

Date d'inscription: 1 septembre 2006

Publications Récentes

default.logout.page.path only works for local redirects, not for external redirects.

Yes you'd have to create a LogoutPostAction implementation to handle this. Check the DefaultLogoutPageAction for an example of what you'd need to do...
Víctor Salvans Montesó
RE: After Logout redirect to Http
17 avril 2013 01:16
Réponse

Víctor Salvans Montesó

Rang: New Member

Publications: 7

Date d'inscription: 4 décembre 2012

Publications Récentes

I'm working on a portal Liferay 6.0.5 with lots of communities (websites for me). I need to set a "after logout url" for each community. All the posts talk about a server solution but not a community. Is any easy way to do it without change server settings, because I can't access to them, and I can redirect others community's users to the same place!.

Any link like /c/portal/logout?redirect=specific_url is possible????

Thanks!
Samir Issa
RE: After Logout redirect to Http
17 avril 2013 17:52
Réponse

Samir Issa

Rang: New Member

Publications: 15

Date d'inscription: 1 avril 2011

Publications Récentes

Hi ,

i think that is not possible , because you need set the class ,in server properties,to redirect after logout


Thanks
Jack Bakker
RE: After Logout redirect to Http
18 avril 2013 14:10
Réponse

Jack Bakker

Rang: Liferay Master

Publications: 840

Date d'inscription: 3 janvier 2010

Publications Récentes

below is from my hook LogoutPreAction where I set after logout redirect somwhere if a user is in a particular role ; perhaps you can use something similar for a community

1
2long companyId = com.liferay.portal.util.PortalUtil.getCompanyId(request);
3long userId = com.liferay.portal.util.PortalUtil.getUserId(request);
4            
5long roleId = RoleLocalServiceUtil.getRole(companyId, "role_name").getRoleId();
6if(UserLocalServiceUtil.hasRoleUser(roleId,userId)){
7    request.setAttribute(WebKeys.REFERER, "/web/somewhere");
8}