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
Conferences
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

Step 2 – Get your access token

After you have registered your application, you are ready to fetch an access token. As we determined in Chapter 2, A Bird's Eye View of OAuth 2.0, the capabilities of your application affect the workflow that you use in this step. Your application could either be trusted, in which case it would use the authorization code grant flow. Or, it could be untrusted, and it would use the implicit grant flow. You could also use any of the other supported workflows described by the specification. This step would then look like this:

Step 2 – Get your access token

The successful completion of a grant flow would result in the acquisition of an access token. This access token can then be used to access a given protected resource. But before we describe how to use an access token, let's first look at what an access token really is.

A closer look at access tokens

Earlier in the book, we made the analogy of access tokens being like physical keys. This is an appropriate analogy in many ways...

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