Reputation: 31
I referred "https://github.com/mswiderski/jbpm-examples/tree/master/spring-boot-jbpm it runs well for GET request. Now I am trying following code
@RequestMapping(value="/test" ,method=RequestMethod.POST)
public String test(@RequestBody String emp){
System.out.println("Your request is "+emp);
return " Hi ";
}
through POSTMAN but it gives me error as,
{ "timestamp": 1511946868300, "status": 403, "error": "Forbidden", "message": "Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.", "path": "/test" }
Please anyone help me to come out of it.
Upvotes: 1
Views: 1207
Reputation: 24
I had same issue and below trick works for me. Set http.csrf().disable() inside configure method of your DefaultWebSecurityConfig Class.
Please refer https://docs.jboss.org/jbpm/release/7.12.0.Final/jbpm-docs/html_single/ [ 3.4.1.2. Configure authentication and authorization].
Hope this solution help you.
Upvotes: -1