Hi Matt, you're always the fastest to reply ^^ It happens in both tests and full running environment. Basically what I did is create an advice UserManagerSecurityAdvice, that will hopefully one day replace your UserSecurityAdvice (not that that's necessary, but I wanted to have a clean start to really understand what's happening) and then registered it as an advice for UserManager. All calls, wether they fail or work fine, go to the UserManager, which is secured if I'm not mistaken.
mraible wrote: > > Does this happen when running the app or just when testing? If it > happens when running the app, make sure the URL patterns are enabling > security for the manager you're accessing. > > Matt > > On Fri, Jan 9, 2009 at 4:52 AM, Christian Decker > <[email protected]> wrote: >> >> Hi all, >> >> I'm trying to build my own security advice for manager calls. For this >> I'm >> using something like this: >> >>> SecurityContext context = SecurityContextHolder.getContext(); >>> log.debug("Checking to see if " + >> context.getAuthentication().getPrincipal() + " has access to " + >> method.getName() + " on " + target.toString()); >> >> The problem is that, strangely, sometimes the authentication is null >> causing >> a nullpointerexception. Even stranger is that it works for some calls and >> for some it doesn't, all while processing a single request. >> >> Any idea where to go? >> >> Regards >> Chris >> >> ----- >> Christian Decker >> http://blog.snyke.net >> -- >> View this message in context: >> http://www.nabble.com/SecurityContext-empty-in-Advices-tp21370878s2369p21370878.html >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > ----- Christian Decker http://blog.snyke.net -- View this message in context: http://www.nabble.com/SecurityContext-empty-in-Advices-tp21370878s2369p21375168.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
