I need to make a jQuery.POST with the user credentials that the Spring Server Security needs to accept the request.
After googling i didn't found a "possible solution".
This is the solution (doesn't work) that seems to be nearest to a real solution.
$.ajax({ type: 'post', url: urlprova, data: JSON.stringily(respostas), dataType: 'json', contentType: 'application/json', success: function(response) { console.log(response); }, xhrFields: { withCredentials: true }, error: function(error) { console.log('ERROR:', error); } });
How i have to fix that code to add the User Credentials for working with the Spring MVC Security.