Middleware csrf generates and validates csrf tokens for Macaron.