Bird
0
0

You want to build an app that accesses user data from a REST API using OAuth 2.0. Which combination correctly describes the roles and tokens involved?

hard📝 Application Q15 of 15
Rest API - Authentication and Authorization
You want to build an app that accesses user data from a REST API using OAuth 2.0. Which combination correctly describes the roles and tokens involved?
AClient app sends refresh token to user to renew access token
BUser sends access token to client app, which then sends password to resource server
CResource server issues authorization code directly to client app without user consent
DClient app uses authorization code to get access token from authorization server, then uses access token to access resource server
Step-by-Step Solution
Solution:
  1. Step 1: Understand OAuth 2.0 roles

    The client app requests an authorization code from the authorization server after user consent.
  2. Step 2: Token exchange and usage

    The client exchanges the authorization code for an access token, then uses it to access the resource server.
  3. Final Answer:

    Client app uses authorization code to get access token from authorization server, then uses access token to access resource server -> Option D
  4. Quick Check:

    Authorization code -> access token -> resource access [OK]
Quick Trick: Authorization code to token, then token to resource [OK]
Common Mistakes:
  • Thinking user sends tokens to client
  • Assuming resource server issues codes without user
  • Confusing refresh token flow

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes