Refer this Open Source application [https://github.com/hiteshchoudhary/apihub]
You see the implementation of Authentication and Authorization based upon roles.