0
0
Rest APIprogramming~5 mins

OAuth 2.0 overview in Rest API - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is OAuth 2.0?
OAuth 2.0 is a protocol that allows apps to access user data from another service securely without sharing passwords. It works by giving apps limited access tokens instead of full credentials.
Click to reveal answer
beginner
Name the four main roles in OAuth 2.0.
The four main roles are: Resource Owner (user), Client (app requesting access), Authorization Server (issues tokens), and Resource Server (hosts protected data).
Click to reveal answer
beginner
What is an access token in OAuth 2.0?
An access token is a special key given to an app after the user approves access. The app uses this token to get data from the resource server without needing the user's password.
Click to reveal answer
intermediate
Explain the Authorization Code Grant flow in OAuth 2.0.
In this flow, the app redirects the user to the authorization server to log in and approve access. Then, the app gets a code it can exchange for an access token. This keeps the user's password safe.
Click to reveal answer
beginner
Why is OAuth 2.0 better than sharing passwords between apps?
OAuth 2.0 lets users give apps limited access without sharing passwords. This reduces risk if an app is hacked and lets users control what data apps can see or change.
Click to reveal answer
Which OAuth 2.0 role is responsible for issuing access tokens?
AAuthorization Server
BResource Owner
CClient
DResource Server
What does an access token allow a client to do?
AChange the user's password
BAccess protected resources on behalf of the user
CAuthenticate the user directly
DDelete the user's account
In OAuth 2.0, who is the Resource Owner?
AThe server issuing tokens
BThe app requesting access
CThe user who owns the data
DThe database storing data
Which OAuth 2.0 flow involves exchanging a code for an access token?
AResource Owner Password Credentials Grant
BImplicit Grant
CClient Credentials Grant
DAuthorization Code Grant
Why should apps use OAuth 2.0 instead of asking for user passwords?
ATo improve security by not handling passwords directly
BTo make users enter passwords more often
CTo store passwords in the app
DTo avoid using tokens
Describe the main roles involved in OAuth 2.0 and their responsibilities.
Think about who owns data, who asks for access, who grants tokens, and who holds the data.
You got /5 concepts.
    Explain how the Authorization Code Grant flow works step-by-step.
    Focus on the code the app gets before the token and why this is safer.
    You got /5 concepts.