Web Technology Basics

A photo-printing app, with the user's permission, reads the user's photos stored on another company's photo storage service. In OAuth 2.0, which of the following roles shows the user a screen asking for permission and, when the user agrees, issues an access token to the app?

  1. AResource server
  2. BAuthorization server
  3. CClient
Show answer and explanation

Answer: B. Authorization server

OAuth 2.0 has four roles: the resource owner (the user), the client (the photo-printing app), the authorization server and the resource server (the API that returns the photos). The authorization server confirms the user and obtains consent, then issues the client an access token limited in scope and lifetime. The client calls the resource server's API with the token, and the resource server checks the token and returns the photos. The user does not have to give the app the password for the photo storage service and can also revoke the permission later.

  • A. The resource server is the side that checks the token and returns the resources (the photos). Tokens are issued by the authorization server.
  • B. Correct. It obtains the user's consent and issues the access token.
  • C. The client is the side that receives the token and calls the API (the photo-printing app).
Practice this topic Back to topic

Books on Web Technology Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Web Technology Basics questions

  1. Which of the following correctly describes the relationship between OAuth 2.0 and OpenID Connect?
  2. Which of the following is an appropriate web API design that follows the principles of REST?
  3. A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?
  4. To put the Japanese character "あ" into a URL query, the byte sequence representing it in UTF-8 (E3 81 82) is percent-encoded. Which of the following is the correct result?
  5. A chat app needs to deliver new messages from the server to the browser immediately. Which of the following correctly describes WebSocket?