Demonstrates how to retrieve an acess_token from oAuth server.
This example uses jquery to assemble an oAuth request to the /token oAuth server. If the credentials are correct, the oAuth server returns the access_token, token_type, and expires_on in a JSON object. This response is then cached on the page to prevent subsequent requests from going to the server.
In a production environment, you would need to hide the access_token if used on public web pages.