Getting Started with OAuth 2.0
Programming clients for secure web API authorization and authentication
Samenvatting
Whether you develop web applications or mobile apps, the OAuth 2.0 protocol will save a lot of headaches. This concise introduction shows you how OAuth provides a single authorization technology across numerous APIs on the Web, so you can securely access users’ data—such as user profiles, photos, videos, and contact lists—to improve their experience of your application.
Through code examples, step-by-step instructions, and use-case examples, you’ll learn how to apply OAuth 2.0 to your server-side web application, client-side app, or mobile app. Find out what it takes to access social graphs, store data in a user’s online filesystem, and perform many other tasks.
- Understand OAuth 2.0’s role in authentication and authorization
- Learn how OAuth’s Authorization Code flow helps you integrate data from different business applications
- Discover why native mobile apps use OAuth differently than mobile web apps
- Use OpenID Connect and eliminate the need to build your own authentication system
Specificaties
Inhoudsopgave
1. Introduction
-How OAuth Was Born
-Why Developers Should Care About OAuth
-Why Don’t These APIs Just Use Passwords for Authorization?
-Terminology
-The Great Debate over Signatures
-Developer and Application Registration
-Client Profiles, Access Tokens, and Authorization Flows
2. Server-Side Web Application Flow
-When Should the Authorization Code Flow Be Used?
-Security Properties
-User Experience
-Step-by-Step
-How Can Access Be Revoked?
3. Client-Side Web Applications Flow
-When Should the Implicit Grant Flow Be Used?
-Limitations of the Implicit Grant Flow
-Security Properties
-User Experience
-Step-by-Step
-How Can Access Be Revoked?
4. Resource Owner Password Flow
-When Should the Resource Owner Password Flow Be Used?
-Security Properties
-User Experience
-Step-by-Step
5. Client Credentials Flow
-When Should the Client Credentials Flow Be Used?
-What APIs Support the Client Credentials Flow?
-How Does the Client Authenticate?
-Security Properties
-Step-by-Step
-When the Access Token Expires
6. Getting Access to User Data from Mobile Apps
-Why You Should Use OAuth for Native Mobile Apps
-What Flow Should Be Used for Native Mobile Apps?
-The (Ugly) Web Browser
-Enhanced Mobile App Authorization for Specific Providers
7. OpenID Connect Authentication
-ID Token
-Security Properties
-Obtaining User Authorization
-Check ID Endpoint
-UserInfo Endpoint
-Performance Improvements
-Practical OpenID Connect
-OpenID Connect Evolution
8. Tools and Libraries
-Google’s OAuth 2.0 Playground
-Google’s TokenInfo Endpoint
-Apigee’s Console
-Facebook’s Access Token Tool and Access Token Debugger
-Libraries
-Going Further
Appendix A: References
Index