revise program code sample for oauth2 authorization code