> 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

Reply via email to