Hi Axel, Andrew
Thanks for your comments and the code below.
One question - this uses the TicketRegistry, which is only available in the
server's code. I'm about to try and hack the JA-SIG client (adding the server
jar etc) to be able to access the ticket registry, but I can't help thinking
it's not the right thing to do.
Are there any sample applications anywhere that do this, that I could take a
look at?
Regards
Richard
> Subject: RE: Principal object
> Date: Tue, 29 Apr 2008 18:11:14 -0400
> From: [EMAIL PROTECTED]
> To: [email protected]
>
> Principal objects it can be obtained from ticketRegistry retrieving the
> ticket that hold the principal. What is exactly you want to do??? You
> can retrieve one ticket by id and get the principal like this:
>
> String user = null;
> Ticket exp = ticketRegistry.getTicket(id);
>
> if(exp != null){
> if(exp instanceof TicketGrantingTicketImpl){
> user =
> ((TicketGrantingTicketImpl)exp).getAuthentication().getPrincipal().toStr
> ing();
> }
> }
> else{
> user =
> exp.getGrantingTicket().getAuthentication().getPrincipal().toString();
>
> }
> }
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
_________________________________________________________________
Be a superhero and win! Play the Iron Man Mashup Game
http://www.ironmanmashup.co.uk_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas