middleware to parse the authorization header