Hello,

I use Tapestry 5 (5.0.11) with acegi (tapestry-acegi 1.0.3).

Following code snipplet should explain my problem:

@Secured("ROLE_USER")
public class OrderConfirm {
   ....
   public void pageLoaded(){
       log.debug("creating order");
log.debug("Authenticated isAuthenticated: "+SecurityContextHolder.getContext().getAuthentication().isAuthenticated()); log.debug("Authenticated getPrincipal: "+SecurityContextHolder.getContext().getAuthentication().getPrincipal());
       ....
   }
   ....
}

If i navigate to that page (not-logged-in), the pageLoaded() method is invoked already before login (ok known todo of tapestry-acegi "Secured class still allows access to action methods"). So my workaround-idea was here, to use "SecurityContextHolder.getContext().getAuthentication().isAuthenticated()" to check if user is authenticated. But method return "true" - but before i was logged-in:
DEBUG - Authenticated isAuthenticated: true
DEBUG - Authenticated getPrincipal: anonymous

Anyone an idea why isAuthenticated() return true?
A "anonymous" user should be a non-authenticated user? Anyone a workaround?

Thank you,
Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to