In order to reinforce CSRF protection in my JSF 2.1(Mojarra) app, I would like to send with every request/response (Every HTTP interaction with the server GETs and POSTs) a value and validate it against an existing one on the server side that was created the moment a successful login was made.
I tried a nested <input type="hidden"> in a <p:fragment autoUpdate="true"> with a @RequestScoped bean but i can't afford to go to every <p:commandButton> in my templates and add the id of the form in the update attribute to perform the update(this will trigger validation in the @PostConstruct annotated method).
What are your suggestions ?
 
    