Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering OAuth 2.0

You're reading from   Mastering OAuth 2.0 Create powerful applications to interact with popular service providers such as Facebook, Google, Twitter, and more by leveraging the OAuth 2.0 Authorization Framework

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher Packt
ISBN-13 9781784395407
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

Preface 1. Why Should I Care About OAuth 2.0? 2. A Bird's Eye View of OAuth 2.0 FREE CHAPTER 3. Four Easy Steps 4. Register Your Application 5. Get an Access Token with the Client-Side Flow 6. Get an Access Token with the Server-Side Flow 7. Use Your Access Token 8. Refresh Your Access Token 9. Security Considerations 10. What About Mobile? 11. Tooling and Troubleshooting 12. Extensions to OAuth 2.0 A. Resource Owner Password Credentials Grant B. Client Credentials Grant C. Reference Specifications Index

Let's build it!


Now that we know more about access tokens, and the various ways to pass them along to the service provider during an API call, let's incorporate this into our application! Currently, we have two versions of our sample application: the client-side example and the server-side example. We will make API calls in both versions of the application, and we will look at utilizing all three methods of passing the access token. Let's begin!

Note

The Facebook Graph API

For our sample application, we will be making API calls to Facebook's Graph API. This is the API that Facebook offers developers who want to integrate with their services. Protected and accessed using OAuth 2.0, this makes for an ideal setting to demonstrate our usage of the protocol. Find more information on the Facebook Graph API at https://developers.facebook.com/docs.

In our client-side application

In Chapter 5, Get an Access Token with the Client-Side Flow, we built an HTML/JS webpage capable of requesting an access...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image