Re: Wicket+Spring 4 integration

2016-10-05 Thread Martin Grigorov
Hi,

You could use global Ajax listener that adds the CSRF token to all Ajax
requests.
In YourApp#init() method do:
getAjaxRequestTargetListeners().add(new
AjaxRequestTarget.AbstractListener() {
   @Override
  public void updateAjaxAttributes(AbstractDefaultAjaxBehavior behavior,
AjaxRequestAttributes attributes)
  {
   if (attributes.getMethod() == Method.POST) {
  attributes.getExtraParameters().put("CSRF-TOKEN",
theTokenTakenFromSpringSecurity);
   }
  }
})

I am not sure where Spring Security looks for the token in a request. If it
is not possible via request parameter then you can use
AjaxCallListener#beforeSend() to put it in the headers.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Oct 5, 2016 at 10:53 AM, mr  wrote:

> hi,
>
> If I remove  tag(because I need csrf protection
> in my app)
> I'm getting exception when pressing the button in my login page:
> "Wicket.Ajax.Call.failure: Error while parsing response: Could not verify
> the provided CSRF token because your session was not found"
> Wicket version-6.24.0
> Spring-security version- 4.1.3
>
> Can someone help me?
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4675645.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket+Spring 4 integration

2016-10-05 Thread mr
hi,

If I remove  tag(because I need csrf protection
in my app)
I'm getting exception when pressing the button in my login page:
"Wicket.Ajax.Call.failure: Error while parsing response: Could not verify
the provided CSRF token because your session was not found"
Wicket version-6.24.0
Spring-security version- 4.1.3

Can someone help me?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4675645.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket+Spring 4 integration

2015-09-26 Thread Martin Grigorov
Thanks for sharing!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Sat, Sep 26, 2015 at 2:04 PM, Sandor Feher  wrote:

> Hi,
>
> Finally I came over my problems. Now my 6.20.0 works fine together with
> Spring 4.1.5 and Spring Security 4.0.2.
> My login page is mounted under /login. So the key was to define login-page
> and more important the login-process-url.
>
> Hope this might help to others who struggling with upgrade to Spring
> Security 4.
>
>   use-expressions="false">
> 
> 
>  login-processing-url="/"/>
>
> 
> 
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672048.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket+Spring 4 integration

2015-09-26 Thread Sandor Feher
Hi, 

Finally I came over my problems. Now my 6.20.0 works fine together with
Spring 4.1.5 and Spring Security 4.0.2. 
My login page is mounted under /login. So the key was to define login-page
and more important the login-process-url.

Hope this might help to others who struggling with upgrade to Spring
Security 4.

 







--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672048.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket+Spring 4 integration

2015-09-24 Thread Martin Grigorov
On Thu, Sep 24, 2015 at 8:40 PM, Richard W. Adams  wrote:

> FYI, we use Spring 4.0.5 with Wicket 1.7.5 & have not encountered any
>

There is no Wicket 1.7.5 :)


> issues. Your mileage may vary.
>
>
>
>
> From:   Sandor Feher 
> To: users@wicket.apache.org
> Date:   09/24/2015 01:37 PM
> Subject:    Re: Wicket+Spring 4 integration
>
>
>
> This email originated from outside of the company.  Please use discretion
> if opening attachments or clicking on links.
>
> I tried to do but I experienced some problems. They might be related to
> Spring but I'm not sure.
> I use spring security. Default login page has changed in 4 so I set my
> wicket app's login page.
> Then login page appeared but there was no action made when I clicked
> submit
> button.
> I dig Springs migration guide but did not found any clue related to my
> issue.
> I reverted back to 3.2.5 and everything worked like expected.
> So this is the whole story.
>
> --
> View this message in context:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672037.html
>
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> **
>
> This email and any attachments may contain information that is
> confidential and/or privileged for the sole use of the intended recipient.
> Any use, review, disclosure, copying, distribution or reliance by others,
> and any forwarding of this email or its contents, without the express
> permission of the sender is strictly prohibited by law.  If you are not the
> intended recipient, please contact the sender immediately, delete the
> e-mail and destroy all copies.
> **
>


Re: Wicket+Spring 4 integration

2015-09-24 Thread Richard W. Adams
FYI, we use Spring 4.0.5 with Wicket 1.7.5 & have not encountered any 
issues. Your mileage may vary.




From:   Sandor Feher 
To: users@wicket.apache.org
Date:   09/24/2015 01:37 PM
Subject:Re: Wicket+Spring 4 integration



This email originated from outside of the company.  Please use discretion 
if opening attachments or clicking on links.

I tried to do but I experienced some problems. They might be related to
Spring but I'm not sure.
I use spring security. Default login page has changed in 4 so I set my
wicket app's login page.
Then login page appeared but there was no action made when I clicked 
submit
button.
I dig Springs migration guide but did not found any clue related to my
issue.
I reverted back to 3.2.5 and everything worked like expected.
So this is the whole story.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672037.html

Sent from the Users forum mailing list archive at Nabble.com.

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




**

This email and any attachments may contain information that is confidential 
and/or privileged for the sole use of the intended recipient.  Any use, review, 
disclosure, copying, distribution or reliance by others, and any forwarding of 
this email or its contents, without the express permission of the sender is 
strictly prohibited by law.  If you are not the intended recipient, please 
contact the sender immediately, delete the e-mail and destroy all copies.
**


Re: Wicket+Spring 4 integration

2015-09-24 Thread Sandor Feher
I tried to do but I experienced some problems. They might be related to
Spring but I'm not sure.
I use spring security. Default login page has changed in 4 so I set my
wicket app's login page.
Then login page appeared but there was no action made when I clicked submit
button.
I dig Springs migration guide but did not found any clue related to my
issue.
I reverted back to 3.2.5 and everything worked like expected.
So this is the whole story.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672037.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket+Spring 4 integration

2015-09-24 Thread Martin Grigorov
On Thu, Sep 24, 2015 at 7:06 PM, Sandor Feher  wrote:

> So this means if I want to use Spring 4 then I must upgrade to Wicket 7.
>

No.
You can use Spring 4.x with Wicket 6.x.


> (Currently I use 6.20.0)
>
> Can I do it safely ? Is 7.0 stable enough ?
>
> TIA,Sandor
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672033.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket+Spring 4 integration

2015-09-24 Thread Sandor Feher
Sounds good. I have up to 15 pages , wicket 6, hibernate 4 and spring 3.
Not so simple but not a nightmare.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672035.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket+Spring 4 integration

2015-09-24 Thread Mihir Chhaya
Just sharing my experience;  I recently migrated medium scale web
application (40+ screens) from wicket 1.4 + Spring 3.x + Hibernate 3.x to
Wicket 7+ Spring 4.2 +Hibernate 4.2 without any integration issue.

-Mihir.

On Thu, Sep 24, 2015, 1:15 PM Sandor Feher  wrote:

> So this means if I want to use Spring 4 then I must upgrade to Wicket 7.
> (Currently I use 6.20.0)
>
> Can I do it safely ? Is 7.0 stable enough ?
>
> TIA,Sandor
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672033.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket+Spring 4 integration

2015-09-24 Thread Sandor Feher
So this means if I want to use Spring 4 then I must upgrade to Wicket 7.
(Currently I use 6.20.0)

Can I do it safely ? Is 7.0 stable enough ?

TIA,Sandor 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031p4672033.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket+Spring 4 integration

2015-09-24 Thread Martin Grigorov
Hi,

There is no reason Wicket to upgrade to Spring to 4.x. You can set Spring
version in your pom.xml to 4.x.

Wicket 7.x uses Spring 4:
https://github.com/apache/wicket/blob/master/pom.xml#L135

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Sep 24, 2015 at 3:56 PM, Sandor Feher  wrote:

> Hi,
>
> I'm just wondering when do you plan to support spring 4 in wicket-spring
> module ?
> I try to implement an Oauth2 server on top of my Wicket app and oauth2 (at
> least 2.0.6 and above) requires spring 4. Right now I'm not able to upgrade
> due to lack of wicket spring 4 support.
>
> TIA., Sandor
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket+Spring 4 integration

2015-09-24 Thread Sandor Feher
Hi,

I'm just wondering when do you plan to support spring 4 in wicket-spring
module ?
I try to implement an Oauth2 server on top of my Wicket app and oauth2 (at
least 2.0.6 and above) requires spring 4. Right now I'm not able to upgrade
due to lack of wicket spring 4 support.

TIA., Sandor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-Spring-4-integration-tp4672031.html
Sent from the Users forum mailing list archive at Nabble.com.

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