adding oauth2 support to Api