consent data privacy middleware