Thanks for replying Mathieu,

That certainly looks interesting and I have managed to get a ticket back
from CAS by using the following scriptlet in my page:

session = request.getSession(false);
boolean returnFromCas = new Boolean((String)
request.getParameter("returnFromCas")).booleanValue();
if(session.getAttribute("SPRING_SECURITY_CONTEXT") == null &&
!returnFromCas){
   
response.sendRedirect("https://localhost:8443/tootired.net/cas/login?gateway=true&service=http%3A//localhost%3A8080/springsecurity2/index.jsp%3FreturnFromCas=true";);
}

if(request.getParameter("ticket") != null){
   
response.sendRedirect("http://localhost:8443/tootired.net/cas/validate?ticket=";
+ request.getParameter("ticket") +
"&casurl=http%3A//localhost%3A8080/springsecurity2/index.jsp%3FreturnFromCas=true");

}

Now when I hit the page I can see the ticket in the query string. I have
been hunting around for code that will  allow me to sent back the ticket to
CAS for validation but am not having much luck. I am currently trying to
build the Cas20ServiceTicketValidator, CasAuthenticationProvider etc. 

Does anyone happen to have a sample of how this should be accomplished?
-- 
View this message in context: 
http://www.nabble.com/How-to-check-if-I-am-logged-into-CAS-or-not-tp18136646p18142343.html
Sent from the CAS Users mailing list archive at Nabble.com.

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to