Configure oauth2 based permission on APIs