I should have pasted a little more code before.  You need the following line
in your onSuccess method:

        
SecurityContextHolder.getContext().setAuthentication(authResult);


Acegi expects to do everything through the SecurityContext.




> -----Original Message-----
> From: Jacob Bergoo [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 28, 2008 9:57 PM
> To: [email protected]
> Subject: Re: T5: Problem with login form with Acegi
> 
> 
> Hi again,
> I had an error in my code when I compared the Set<GrantedAuthority> with a
> String value... I changed that so the Set takes a String as input instead.
> Now it goes into the first if statement and try to call page Secure and I
> get the same error as I posted in my previous posting...
> 
> in the end the error states:
> Caused by: org.acegisecurity.AccessDeniedException: Access is denied
>         at
> org.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:68)
>         at
> $AccessDecisionManager_118f7af2115.decide($AccessDecisionManager_118f7af21
> 15.java)
>         at
> org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(A
> bstractSecurityInterceptor.java:323)
>         at
> nu.localhost.tapestry.acegi.services.internal.StaticSecurityChecker.checkB
> efore(StaticSecurityChecker.java:43)
>         at
> $SecurityChecker_118f7af20ce.checkBefore($SecurityChecker_118f7af20ce.java
> )
>         at com.bergoo.webshop.pages.Secure.beginRender(Secure.java)
>         at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run(C
> omponentPageElementImpl.java:338)
>         at
> org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(Com
> ponentPageElementImpl.java:874)
>         ... 98 more
> 
> I don't see the reason why I get the Access denied.
> Thanks for any help...
> Jacob
> --
> View this message in context: http://www.nabble.com/T5%3A-Problem-with-
> login-form-with-Acegi-tp16364295p16365723.html
> Sent from the Tapestry - 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]

Reply via email to