Support for OAuth2

Support has been added for OAuth2.

Net Change ID: 12056