[cas-dev] JASIG CAS Client for Java 3.1.0-RC1 - how to access User ID
Scott Battaglia
scott.battaglia at gmail.com
Mon Jan 7 08:39:35 EST 2008
Alar,
Please feel free to update our wiki pages if you think something could be
clarified more. All you need is an account in our system (which you can
self-create). Some of the information is available though, and those are
detailed below.
Thanks!
-Scott
On Jan 4, 2008 11:30 AM, Alar <ng at wbgrupp.net> wrote:
> <snip />
>
> 2. Short description for filters and their purposes - good for newbies
> like me.
This information is listed here:
http://www.ja-sig.org/wiki/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml
>
>
> 3. Filter and filter-mappings ORDER is important - yes now it makes
> sense after messing around with debugger a bit.
This information is listed here:
http://www.ja-sig.org/wiki/display/CASC/CAS+Client+for+Java+3.1
>
> 2008/1/4, Scott Battaglia <scott.battaglia at gmail.com>:
> > Alar,
> >
> > Has the application already authenticated via CAS? Also, is the filter
> > coming after the authentication/validation filters?
> >
> > -Scott
> >
> >
> > On Jan 4, 2008 9:50 AM, Alar < ng at wbgrupp.net> wrote:
> > > Thanks for the fast reply.
> > > I tried out these instructions, but I'm still in trouble. I just added
> > > filter to web.xml in following way:
> > >
> > > ---
> > > <filter>
> > > <filter-name>CAS HttpServletRequest Wrapper
> > Filter</filter-name>
> > > <filter-class>
> > org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
> > > </filter>
> > >
> > > <filter-mapping>
> > > <filter-name>CAS HttpServletRequest Wrapper
> > Filter</filter-name>
> > > <url-pattern>/*</url-pattern>
> > > </filter-mapping>
> > >
> > > ---
> > >
> > > I can see with debugger that this filter is accessed when I'm
> > > redirected back from login screen to my application, but in
> > > HttpServletRequestWrapperFilter.java
> > > at doFilter(..) the principal is null as well as assertion is null
> > > inside retrievePrincipalFromSessionOrRequest ()
> > > And therefore getRemoteUser() returns also null later on.
> > >
> > > I also tried out AssertionThreadLocalFilter, but result is similar.
> > >
> > > Just for remark: I run this Tapestry 4 based application with Jetty
> > > 5.x - but I hope this is not disturbing CAS.
> > >
> > > Thanks in advance,
> > > Alar
> > >
> > >
> > >
> > >
> > > 2008/1/4, Scott Battaglia <scott.battaglia at gmail.com>:
> > >
> > >
> > >
> > > > Alar,
> > > >
> > > > Yes, the JASIG CAS Client for Java 3.1 has a
> > > > HttpServletRequestWrapperFilter:
> > > >
> >
> http://www.ja-sig.org/wiki/display/CASC/Configuring+the+JA-SIG+CAS+Client+for+Java+in+the+web.xml
> > > >
> > > > You can use that to access either the Principal object or the remote
> > user.
> > > > You can also use the AssertionThreadLocalFilter to make the
> Assertion
> > > > available anywhere in your application.
> > > >
> > > > -Scott
> > > >
> > > >
> > > > On Jan 4, 2008 12:18 AM, Alar <ng at wbgrupp.net> wrote:
> > > > >
> > > > > I can not figure out how to access User ID from java code after
> > > > > successful login.
> > > > >
> > > > > There is HttpServletRequestWrapperFilter example in
> > > > >
> > > > >
> > > >
> > http://www.ja-sig.org/products/cas/client/client-java/index.html
> > > > >
> > > > > but I'm not sure if is can be applied to client version 3.1
> > > > >
> > > > >
> > > > > Thanks for tips!
> > > > > _______________________________________________
> > > > > cas-dev mailing list
> > > > > cas-dev at tp.its.yale.edu
> > > > > http://tp.its.yale.edu/mailman/listinfo/cas-dev
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > -Scott Battaglia
> > > >
> > > > LinkedIn: http://www.linkedin.com/in/scottbattaglia
> > > > _______________________________________________
> > > > cas-dev mailing list
> > > > cas-dev at tp.its.yale.edu
> > > > http://tp.its.yale.edu/mailman/listinfo/cas-dev
> > > >
> > > >
> > > _______________________________________________
> > > cas-dev mailing list
> > > cas-dev at tp.its.yale.edu
> > > http://tp.its.yale.edu/mailman/listinfo/cas-dev
> > >
> >
> >
> >
> > --
> > -Scott Battaglia
> >
> > LinkedIn: http://www.linkedin.com/in/scottbattaglia
> > _______________________________________________
> > cas-dev mailing list
> > cas-dev at tp.its.yale.edu
> > http://tp.its.yale.edu/mailman/listinfo/cas-dev
> >
> >
> _______________________________________________
> cas-dev mailing list
> cas-dev at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas-dev
>
--
-Scott Battaglia
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas-dev/attachments/20080107/9cf15377/attachment.html
More information about the cas-dev
mailing list