Helper for API Authentication based on HTTP header