Web Technology Basics
Which of the following correctly describes the relationship between OAuth 2.0 and OpenID Connect?
- AOAuth 2.0 is a mechanism for delegating permission to access resources (authorization), and OpenID Connect builds on it by adding an ID token that conveys the result of authentication, so that it can be used for login
- BOAuth 2.0 is a mechanism for conveying the result of user authentication, and OpenID Connect does not use it but sends the user's password directly to each connected service to check it
- COpenID Connect is a protocol for encrypting HTTP communication and is used instead of TLS when sending login screens
Show answer and explanation
Answer: A. OAuth 2.0 is a mechanism for delegating permission to access resources (authorization), and OpenID Connect builds on it by adding an ID token that conveys the result of authentication, so that it can be used for login
An OAuth 2.0 access token represents permission, meaning "you may use resources within this scope", and is not designed to confirm who has logged in. OpenID Connect adds to the OAuth 2.0 flow an ID token in the form of a signed JWT. The ID token contains the issuer, the user identifier, the intended client, the expiry and so on, and the client checks the signature and contents to learn who the user is. This mechanism is used for features that let users log in with an account from another service and for single sign-on.
- A. Correct. It adds an ID token that conveys the result of authentication to OAuth 2.0, which is an authorization mechanism.
- B. The roles are reversed. OAuth 2.0 is an authorization mechanism, and OpenID Connect is built on top of OAuth 2.0.
- C. Encrypting communication is the role of TLS. OpenID Connect is used over communication protected by TLS.