I totally agree. Adding the Wrapper Filter seemed really easy. So I tried that first, but all I got back was null.
There are no errors thrown on the CAS server and none where my CASifyed app is deployed. I have to assume that the Wrapper Filter is catching and eating all SSL errors since my certs aren't trusted. Anyway, thanks for your help this has been a fun project. And we aren't done yet. -----Original Message----- From: Marvin Addison [mailto:[email protected]] Sent: Friday, July 31, 2009 11:20 AM To: [email protected] Subject: Re: [cas-user] How do I get prinicpal from CASifyed client program? > String ticketValue = (String)request.getParameter("ticket"); > URL url = new > URL("https://testserver.utah.edu/cas/validate?ticket="+ticketValue+"&service="+"https://othertestserver.utah.edu/casringtest/casclient"); > BufferedReader in = new BufferedReader(new > InputStreamReader(url.openStream())); > if (in==null){ > System.out.println("no url input stream"); > } else{ > String line1 = in.readLine(); > String line2 = in.readLine(); > System.out.println("line1; "+line1); //yes or no > System.out.println("line2: "+line2); //principal > } You're doing way more work than you need. You were on the right track originally with org.jasig.cas.client.util.HttpServletRequestWrapperFilter. Once that filter is working it's as simple as request.getRemoteUser() or request.getUserPrincipal(). M -- 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 -- 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
