OAuth support for authorization code flow

OAuth 2.0 authorization code flow allows a user to access a resource by authenticating directly with a third-party OAuth server that trusts the resource, instead of authenticating with username/password credentials.

This implementation of OAuth authorization code flow allows a user to get access to a resource via REST. The authorization code framework automatically gets the access and refresh tokens through the authorized URL that the administrator configures, instead of requiring the user to enter a user name and password to get access to the resource.