On Wed, Apr 30, 2008 at 8:32 AM, Richard Gundersen <
[EMAIL PROTECTED]> wrote:

>  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.
>

That won't work.  The client has no access to the internal registry of the
server, and it shouldn't!  The client never has access to the what's stored
in the server directly.  A client can only reconstruct a Principal based on
whatever the server decides to send to it. By default, the server only sends
the username (though if you use SAML 1.1 you'll also see the attributes
stored in the principal's map).  SAML 1.1 is only supported with the JASIG
CAS client.

-Scott


>
> 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
>
> ------------------------------
> Messenger's gone Mobile! Get it now! <http://messengergonemobile.com>
>
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>


-- 
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to