make csrf parser reuseable