Hi all, I implement CAS SSO across both Alfresco (3.3E) and a third party sample application.(a simple servelt) I need call a webscript (for example …alfresco/wcservice/office/getUsers) through HttpClient get. The problem is:CAS server return CAS login page ( i retrieve the page from method.getResponseBodyAsString()) It should be noted that if i try to call the same webscript from browser (after SSO CAS login) i retrieve the correct result and the authentication is correctly managed.
For example:
-from browser i call a simple servlet (A) filtered by CAS. -CAS login prompt appear -Log in with admin/admin -CAS authentication ok -Call simple servlet (A) with request param (?goto=callAlf) .The servlet run the HttpClient above:
I suggest to install the CAS REST API to allow HTTP call directly to the CAS server without parsing the HTML page. Otherwise you need to parse the HTML page of the login form to get all the hidden parameters included in this form to allow you to create a granting ticket.