Implement an authorization system
Added an example for api authorization