Principal object
Scott Battaglia
scott.battaglia at gmail.com
Wed Apr 30 08:52:43 EDT 2008
On Tue, Apr 29, 2008 at 12:26 PM, Richard Gundersen <
richardgundersen at hotmail.com> wrote:
> Hi, I also have a couple of questions :)
>
> 1) Please could someone tell me how to get hold of the principal object?
>
> I've written my own CredentialsToPrincipal resolver, and my own Principal
> object, and I log in successfully.
> I can't quite figure out where the principal is stored though. I'm using
> the YaleFilter, but I can't see anything to do with the principal in the
> source, or in the CAS server source either.
>
Get a hold of the Principal object where? On the server side its available
as part of the Authentication object. On the client-side you need to
construct it from the response given back by the server. The Yale client
only supports the unmodified CAS2 protocol, which can retrieve the
username. The JASIG CAS Client (which is part of Spring Security 2.0)
allows you to more easily plug in other validators such that you can parse
custom responses and reconstruct the Principal.
>
>
> 2) Should something be in this session attribute as per the docs? (if
> there should be, the filter doesn't seem to set it):
>
> edu.yale.its.tp.cas.client.filter.receipt
>
> I don't know about the specific attributes for the Yale filter, but it
does set a CASReceipt in the session. I don't believe it says a Principal
object.
-Scott
> Many thanks
>
> Richard
>
>
> ------------------------------
> Date: Tue, 29 Apr 2008 08:27:28 -0400
> From: scott.battaglia at gmail.com
> To: cas at tp.its.yale.edu
> Subject: Re: does CAS support non-ascii netId?
>
> Li,
>
> CAS should support whatever you pass along. I would check if the
> application server / JVM are both configured to support the characters.
>
> -Scott
>
> On Tue, Apr 29, 2008 at 3:29 AM, Li Wei Nan <liweinan at chinaedu.net> wrote:
>
> Hi Everyone,
> We have some problem when users use Chinese character as their netId.
>
> I think it's a config problem somewhere. Here's our environment:
>
> - cas pages are UTF-8
>
> - data in datasource are UTF-8 encoded
>
> - linux env is: LANG=en_US.UTF-8
>
> - dataSource
> config: <value>jdbc:postgresql://localhost:5432/edupass</value>
>
> Does anyone has the similar problem and sovled it before?
>
> Thanks,
>
> - Li Wei Nan
>
>
>
>
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
>
> --
> -Scott Battaglia
> PGP Public Key Id: 0x383733AA
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
>
>
> ------------------------------
> Messenger's gone Mobile! Get it now! <http://messengergonemobile.com>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
--
-Scott Battaglia
PGP Public Key Id: 0x383733AA
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080430/d3591614/attachment.html
More information about the cas
mailing list