I agree with Scott, but it also sounds like it doesn't have all that much to do with authentication. Why not just create a Filter that does whatever you want to and insert it into the filter chain wherever you need to insert it? You can check the HttpSession to see whether you've populated the value, and if it hasn't been populated, then populate it. If you are using Spring, then CompositeFilter might help you if you need to stack filters: http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframe work/web/filter/CompositeFilter.html.
From: Scott Battaglia [mailto:[email protected]] Sent: Thursday, April 11, 2013 4:48 PM To: [email protected] Subject: Re: [cas-user] Executing method upon login, regardless of page chosen Is there a reason you can't keep the code where it is (in terms of the method) but move it above the slightly unreliable database logic? -Scott Battaglia PGP Public Key Id: 0x383733AA LinkedIn: http://www.linkedin.com/in/scottbattaglia On Thu, Apr 11, 2013 at 11:20 AM, Bruno <[email protected]> wrote: I am using CAS 3.1.3 (yes I know, prehistoric) and love it. I have an application that must execute a bit of code after the user logged in, regardless of what page he is going to. For example, it could check his birth date in the database and set a bday flag in the session so that all pages would display "Happy Birthday" on the right day. We used to have this code executed from a custom UserDetailsService, but failures (either database connectivity or bad data in our DB) were interfering with the login process. So I'm looking for something more resilient that can be executed *after* the login is complete, perhaps when the spring controllers are getting ready to display the page. I can think of a few ways to do this but I was wondering if there is a recommended approach? -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
smime.p7s
Description: S/MIME cryptographic signature
