WHy is service ticket null?
Scott Battaglia
scott.battaglia at gmail.com
Mon Mar 12 09:24:49 EDT 2007
On 3/9/07, t ray <t_ray9505 at yahoo.com> wrote:
>
> Thanks for the response.
>
> Can the filter in front of CAS Filter redirect to a page that is also
> protected? Meaning, say user tried going to Demo1.jsp that is protected.
> My filter intercepts and determines that datasource is not initialized. Can
> my filter then redirect to Initialize.jsp that is also protected? Won't
> that redirect cause my filter (and CAS filter) to be invoked again?
>
You can make sure that your "Initialization check" filter does not protect
the Initialize.jsp page and then it would not be run again on the redirect.
Your "Initialization check" filter would do a redirect rather than continue
the filter chain (you could also just redirect to CAS with the initialize
page as the service url).
-Scott
Hmm, perhaps my filter can explicitly not pass Initialize.jsp on to CAS
> filter just as it didn't pass Demo1.jsp to CAS filter..... (thinking
> aloud)
>
> Does this sound reasonable?
>
> By the way, related to a previous question (issue #2), is there a way to
> get CAS to display different error page when authentication fails depending
> on the reason for failure? For example, can I display 1 error page when it
> fails due to username/pwd mismatch versus a different error page when
> datasource is not initialized? Does CAS support this behaviour?
>
> Thanks.
>
> ----- Original Message ----
> From: Scott Battaglia <scott.battaglia at gmail.com>
> To: Yale CAS mailing list <cas at tp.its.yale.edu>
> Sent: Friday, March 9, 2007 4:43:46 AM
> Subject: Re: WHy is service ticket null?
>
> You could put a filter in front of the CAS filters that checks for the
> status of the datasource and redirects appropriately (otherwise it moves on
> to the next filter in the chain which would be the CAS filter).
>
> -Scott
>
> On 3/9/07, t ray <t_ray9505 at yahoo.com> wrote:
> >
> > Looks like a bit of chicken and egg situation for me- I need to do be
> > able to do one of the following-
> > 1. make sure my datasource is up and in valid state BEFORE I let the
> > user attempt to login, OR
> > 2. alternatively, I figure out during authentication that datasource is
> > not up and redirect the user to a different page to allow it to be
> > configured.
> >
> > So, I figured that if I could do my preprocessing and then somehow gain
> > a ticket, I could validate it etc per the code I mentioned.
> >
> > Is this achievable?
> >
> > ----- Original Message ----
> > From: Scott Battaglia < scott.battaglia at gmail.com>
> > To: Yale CAS mailing list <cas at tp.its.yale.edu>
> > Sent: Thursday, March 8, 2007 8:43:00 PM
> > Subject: Re: WHy is service ticket null?
> >
> > You won't have a ticket available in your Request object unless you let
> > the user authenticate to CAS and then have CAS redirect back to your
> > service.
> >
> > -Scott
> >
> > On 3/8/07, t ray <t_ray9505 at yahoo.com > wrote:
> > >
> > > Hello,
> > > I am having trouble getting the service ticket. I use the following
> > > code and ticket turns out to be null-
> > >
> > > ServiceTicketValidator sv = new ServiceTicketValidator();
> > > sv.setCasValidateUrl(" https://localhost:8443/cas/serviceValidate
> > > ");
> > > sv.setService("http://localhost:8080/examples/jsp2/dem/basic-stuff.jsp
> > > ");
> > > System.out.println("TICKET="+request.getParameter("ticket"));
> > > sv.setServiceTicket(request.getParameter("ticket"));
> > > sv.validate();
> > > As per my understanding, one needs to either manually validate a
> > > ticket OR set up the filters etc within web.xml. I have NOT modified
> > > web.xml and I expected the above to work. Things work fine when I
> > > modify the web.xml and let the filters redirect my requests to CAS.
> > >
> > > Suggestions?
> > >
> > > Thanks.
> > >
> > > ------------------------------
> > > Expecting? Get great news right away with email Auto-Check.<http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>
> > > Try the Yahoo! Mail Beta.
> > > <http://us.rd.yahoo.com/evt=49982/*http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html>
> > >
> > > _______________________________________________
> > > Yale CAS mailing list
> > > cas at tp.its.yale.edu
> > > http://tp.its.yale.edu/mailman/listinfo/cas
> > >
> > >
> >
> >
> > --
> > -Scott Battaglia
> >
> > LinkedIn: http://www.linkedin.com/in/scottbattaglia
> > _______________________________________________
> > Yale CAS mailing list
> > cas at tp.its.yale.edu
> > http://tp.its.yale.edu/mailman/listinfo/cas
> >
> >
> > ------------------------------
> > Don't pick lemons.
> > See all the new 2007 cars<http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw-->at Yahoo!
> > Autos.<http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE0OGRsc3F2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3Y2Fycw-->
> >
> > _______________________________________________
> > Yale CAS mailing list
> > cas at tp.its.yale.edu
> > http://tp.its.yale.edu/mailman/listinfo/cas
> >
> >
>
>
> --
> -Scott Battaglia
>
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
> ------------------------------
> No need to miss a message. Get email on-the-go
> <http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail%0A>
> with Yahoo! Mail for Mobile. Get started.<http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail%0A>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
--
-Scott Battaglia
LinkedIn: http://www.linkedin.com/in/scottbattaglia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20070312/f3e033e6/attachment.html
More information about the cas
mailing list