As I said it's far from perfect!

The code is for wicket 7 indeed.

I was not aware to the 2 minutes limit and I never hit it.
A solution would be to call grecaptcha.execute on the button's click, wait
for the response and then submit the ajax request. I'm not a JS expert, thus
I don't know how difficult it is to implement.

For those who need a little bit of documentation : 
You need to add the behavior in the form onInitialize() method : 
            final AjaxRecaptchaV3Validator ajaxRecaptchaV3Validator = new
AjaxRecaptchaV3Validator("action","private key", "public key", "proxy url",
"proxy port");
            add(ajaxRecaptchaV3Validator);

The proxy parameters can be null.

Then on the ajax submit button overrides updateAjaxAttributes : 
                  @Override
                protected void updateAjaxAttributes(final
AjaxRequestAttributes paramAttributes) {
                    super.updateAjaxAttributes(paramAttributes);
                   
AjaxRecaptchaV3Validator.addExtraParameters(paramAttributes);
                }



--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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

Reply via email to