Thanks Matt for your suggestion.

In the end I got it working without touching the web flow xml file.

In the AuthenticationHandler I have modified the service url by adding my new 
parameter "s". Since "service" is a 

org.jasig.cas.authentication.principal.SimpleWebApplicationServiceImpl object 
and I cannot overwrite the id and orinalUrl, I have created another object of 
this class with my url with the new parameter added:

                    RequestContext rc=RequestContextHolder.getRequestContext();
                            
                     
                     WebApplicationService was=WebUtils.getService(rc);
                     String newurl=(String)was.getId();

                     newurl=newurl+"?s="+s;
                     WebApplicationService wasnew=new 
SimpleWebApplicationServiceImpl(newurl);
                     rc.getFlowScope().put("service", wasnew);


Thus, if you enter the following url

https://localhost:8443/webapps/CampusLauncherJava/prueba.jsp

you will be redirected to the CAS login page:

https://localhost:8443/cas/login?service=https%3A%2F%2Flocalhost%3A8443%2Fwebapps%2FCampusLauncherJava%2Fprueba.jsp

and once you have logged in you will be redirected to the original url with the 
added parameter.

https://localhost:8443/webapps/CampusLauncherJava/prueba.jsp?s=c4

It is a pitty that the name of the service parameter is not exposed as a public 
constant I have to put directly in my handler.


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to