Exercises
Assess your practical understanding of OAuth 2.0 and OpenID Connect in backend systems. This quiz covers protocol roles, authorization flows, PKCE, access and ID tokens, security parameters, token validation, refresh tokens, scopes, introspection, and machine-to-machine authentication. The questions range from foundational concepts to security decisions that backend developers must make when integrating an identity provider.
Answer the questions below and check the explanation for each answer.
0/13 answered
Auto audio on: the next questions will be read aloud when you click Continue.
OAuth 2.0 is an authorization framework. It lets a client obtain limited access to protected resources without requiring the user to give that client their credentials.
The resource server protects APIs and data. It validates or introspects the presented access token before deciding whether to serve the request.
OpenID Connect adds an identity layer to OAuth 2.0. It standardizes user authentication and supplies identity information, primarily through the ID token.
The client sends the original code verifier when exchanging the authorization code. The server derives its challenge and compares it with the challenge saved earlier.
An access token represents delegated authorization to a protected resource. ID tokens describe authentication to a client, while authorization codes are exchanged at the token endpoint.
A backend must verify the JWT's signature and security-relevant claims, including issuer, intended audience, and expiration. Merely decoding a JWT does not establish trust.
The client creates and later verifies an unpredictable state value. This binds the authorization response to the initiating browser session and helps prevent login CSRF and related response-injection attacks.
The client sends a nonce and verifies that the same value appears in the ID token. This links the token to the original request and helps detect token replay.
The client credentials grant is designed for machine-to-machine authorization where the client acts on its own behalf rather than for an interactive user.
Exact matching prevents attackers from manipulating the redirect destination and receiving authorization codes or other sensitive responses at an unauthorized endpoint.
Following least privilege, a client should request only the permissions it currently needs. A narrow read scope reduces the damage possible if the token is leaked or misused.
With rotation, each refresh token is normally single-use. Reuse can indicate token theft, so the server should detect the event and invalidate the related token family according to its security policy.
An opaque token has no locally readable standardized claims. An authorized resource server can send it to the issuer's introspection endpoint to learn whether it is active and retrieve relevant metadata.

Free CourseBackend REST API
5h24m
25 exercises

Free CourseNodeJS complete
1h30m
12 exercises

Free CourseAPIs
4h32m
20 exercises

Free CourseFlask
8h50m
14 exercises

Free CourseDjango for Everybody
18h32m

Free CoursePython Django Full Stack Developer
14h23m
27 exercises

Free CourseMaster Vue JS API
6h14m
6 exercises

Free CoursePython Fast API
1h34m
14 exercises
Thousands of online courses in video, ebooks and audiobooks.
To test your knowledge during online courses
Generated directly from your cell phone's photo gallery and sent to your email
Download our app via QR Code or the links below:.
+ 10 million
students
Free and Valid
Certificate
60 thousand free
exercises
4.8/5 rating in
app stores
Free courses in
video and ebooks