I cannot find any code about server-side for recaptcha v3 in java. I already added the code in my jsp file (client-side) (as you see below) but how to process it in server-side? Actually, I need server-side code in java for recaptcha v3. Thanks.
<head>
<script
src="https://www.google.com/recaptcha/api.js?render=MySiteKey"></script>
</head>
<form>
<input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
<input type="hidden" name="action" value="validate_captcha">
</form>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('MySiteKey', {
action : 'validate_captcha'
}).then(function(token) {
document.getElementById('g-recaptcha-response').value = token;
});
});
</script>
There are some exmaple in PhP such as here, but I need for java.