From OAuth 2 in Action

Getting an OAuth access token using the authorization code flow

Getting an OAuth access token using the authorization code flow