I'm working with liferay and implemented cas+ldap and it is working fine in the server, now I got a question, how can I create a portlet to redirect to an external URL and use the same user who was authenticated in liferay?
I tried
public class gotoURL extends MVCPortlet throws IOException {
private String sessionID = null;
public void addDetails(ActionRequest request, ActionResponse response) {
Cookie[] c =request.getCookies();
for(int i =0;i<c.length;i++){
if(c[i].getName().equals("JSESSIONID")){
sessionID = c[i].getValue();
}
}
response.encodeURL("my_external_web");
response.sendRedirect("my_external_web");
}
}
i've also tried to make an iFrame into the liferay portal and pass the @screen_name@
and @password@
but it did't work(the another web is http and have a captchat).
Can i pass the jsessionid or similar to authenticate in another web page without have access to modify that application or i need to modifiy the external web page? in this case, what i need to add in the external web? Thanks!