O'Reilly logo

OAuth 2.0 Identity and Access Management Patterns by Martin Spasovski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Practical example

Now that we covered the implicit grant in detail we can create a practical example.

We will make an example web application that will use Dropbox as its authorization server and will implement the implicit grant.

The example application consists of an HTML page with JavaScript and jQuery where all the logic is coded. When this page is served from the server to the browser, everything including the client_id parameter is exposed to the public.

When we open the root folder of the example application, the important file is the following:

  • src\main\webapp\WEB-INF\pages\hello.jsp: This contains the HTML template and the JavaScript logic

Additionally, for added clarity we will check out the cURL statements of the same HTTP requests that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required