Accessing attributes using JASIG client

Scott Battaglia scott.battaglia at gmail.com
Thu May 29 11:59:30 EDT 2008


Dale,

If you've enabled the Request wrapping filter, you can call the
getPrincipal() method and then cast that principal to AttributePrincipal to
obtain attributes map.

-Scott

On Thu, May 29, 2008 at 12:33 AM, dale77 <Dale.Ogilvie at trimble.co.nz> wrote:

>
> Hello,
>
> how do I access the attributes for an authenticated user in my CAS
> protected
> jsp?
>
> I am using the Saml11TicketValidationFilter, because I believe that this
> Filter provides the attributes to the client.
>
> Looking at the source I found some code:
>
>                request.setAttribute(CONST_CAS_ASSERTION, assertion);
>
>                if (this.useSession) {
>                    request.getSession().setAttribute(CONST_CAS_ASSERTION,
>                            assertion);
>                }
>
> Possibly I could get at the attributes through the Assertion, but I'm
> assuming there is an easier way than
> request.getAttribute("_const_cas_assertion").
>
> Any pointers would be appreciated.
>
> Thanks
>
> Dale
> --
> View this message in context:
> http://www.nabble.com/Accessing-attributes-using-JASIG-client-tp17527439p17527439.html
> Sent from the CAS Users mailing list archive at Nabble.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/20080529/5904c444/attachment.html 


More information about the cas mailing list