You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by massizigao <fh...@online.de> on 2011/11/07 17:23:32 UTC

Spring secury + auth-roles authentication and authorization: access denied

Hello together,

I am trying to implement an authentication+authorization using Spring
security and wicket-auth-roles based on this 
https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html
article . The application is working, that means i can authencate and can
see some pages. But then after more clicking, i receive an access denied
error. The strange think is, when i logout and login again, thinks seem to
work fine. So it happens only at the first time login. Debugging shows me
that the authentication object is null. I try to identify the place it is
set to null but without success.
Hier a little code from my implementation. I am using 
wicket 1.5.2
tomcat 6.0.33
spring 3.0.6
spring security 3.0.7
The page is mounted to /index.

*spring-security-context.xml:*


*web.xml*


*CustomAuthenticatedWebSession.java*

*A secured page:  Index.java*



Thank you for your help.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Spring-secury-auth-roles-authentication-and-authorization-access-denied-tp4004013p4004013.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Spring secury + auth-roles authentication and authorization: access denied

Posted by massizigao <fh...@online.de>.
Thank you Moèz  for your reply.
I looked at the blog you sent, but it didn't helped either. Indeed the
application in the blog does not differ substantially from mine. I updated
my codes with the example implementation and the problem still remains. The
only differences are the  versions of wicket, spring and spring security and
the following methods:

*CustomAuthenticatedWebSession:*

*LoginForm*:

 



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Spring-secury-auth-roles-authentication-and-authorization-access-denied-tp4004013p4015730.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Spring secury + auth-roles authentication and authorization: access denied

Posted by moèz ben rhouma <be...@gmail.com>.
http://javajeedevelopment.blogspot.com/2011/03/integrating-spring-security-3-with.html

2011/11/7 massizigao <fh...@online.de>

> Hello together,
>
> I am trying to implement an authentication+authorization using Spring
> security and wicket-auth-roles based on this
> https://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html
> article . The application is working, that means i can authencate and can
> see some pages. But then after more clicking, i receive an access denied
> error. The strange think is, when i logout and login again, thinks seem to
> work fine. So it happens only at the first time login. Debugging shows me
> that the authentication object is null. I try to identify the place it is
> set to null but without success.
> Hier a little code from my implementation. I am using
> wicket 1.5.2
> tomcat 6.0.33
> spring 3.0.6
> spring security 3.0.7
> The page is mounted to /index.
>
> *spring-security-context.xml:*
>
>
> *web.xml*
>
>
> *CustomAuthenticatedWebSession.java*
>
> *A secured page:  Index.java*
>
>
>
> Thank you for your help.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Spring-secury-auth-roles-authentication-and-authorization-access-denied-tp4004013p4004013.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Cdt
Moèz

Re: Spring secury + auth-roles authentication and authorization: access denied

Posted by massizigao <fh...@online.de>.
Hello Andrew,

that was the solution! You saved my day!
Thank you  a lot!

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Spring-secury-auth-roles-authentication-and-authorization-access-denied-tp4004013p4019263.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org