Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Samir Issa
After Logout redirect to Http
7 de Março de 2012 13:11
Resposta

Samir Issa

Ranking: New Member

Mensagens: 15

Data de entrada: 1 de Abril de 2011

Mensagens recentes

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 de Março de 2012 21:05
Resposta

David H Nebinger

Ranking: Liferay Legend

Mensagens: 7914

Data de entrada: 1 de Setembro de 2006

Mensagens recentes

You can use a logout.events.post handler to do a redirect on logout.
Samir Issa
RE: After Logout redirect to Http
8 de Março de 2012 04:27
Resposta

Samir Issa

Ranking: New Member

Mensagens: 15

Data de entrada: 1 de Abril de 2011

Mensagens recentes

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 de Março de 2012 05:08
Resposta

David H Nebinger

Ranking: Liferay Legend

Mensagens: 7914

Data de entrada: 1 de Setembro de 2006

Mensagens recentes

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 de Abril de 2013 01:16
Resposta

Víctor Salvans Montesó

Ranking: New Member

Mensagens: 7

Data de entrada: 4 de Dezembro de 2012

Mensagens recentes

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 de Abril de 2013 17:52
Resposta

Samir Issa

Ranking: New Member

Mensagens: 15

Data de entrada: 1 de Abril de 2011

Mensagens recentes

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 de Abril de 2013 14:10
Resposta

Jack Bakker

Ranking: Liferay Master

Mensagens: 689

Data de entrada: 3 de Janeiro de 2010

Mensagens recentes

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}