[{"id":"oauthoidcbeginner-001","courseId":"oauth-oidc-beginner","domain":"authorization-flows","topic":"Roles in OAuth","prompt":"A photo app holds an access token from the authorization server. When it calls the photo API with that token, which role does the photo API play?","hint":"Think about who checks the token when the data is requested.","explain":"In this protocol, each role is defined by the job its party does in the exchange. Think about which party checks a credential at the moment a data request arrives.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-1.1","interaction":{"type":"single"},"options":[{"id":"a","text":"Resource owner","whyNot":"The owner grants access to their data, but does not check tokens on each request."},{"id":"b","text":"Authorization server","whyNot":"It issues the access token to the client, but it does not serve the protected data itself."},{"id":"c","text":"Client","whyNot":"The photo app presents the token; it does not validate the token or serve the request."},{"id":"d","text":"Resource server","why":"The resource server validates the access token and, if it is valid, serves the request."}],"answer":"d","explanation":"Each OAuth role has a distinct job; the resource server validates access tokens and serves the protected request.","concept":"Each OAuth role has a distinct job; the resource server validates access tokens and serves the protected request.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["The resource server checks tokens and serves protected data; the authorization server issues the tokens."]},{"id":"oauthoidcbeginner-002","courseId":"oauth-oidc-beginner","domain":"authorization-flows","topic":"Protocol flow overview","prompt":"Put these five steps of the abstract OAuth 2.0 flow in order.","hint":"Work out what has to exist before each request can be made.","explain":"A credential-based exchange moves through stages, and each stage hands something to the next. Ask what a party must already hold before it can make the next request, and what that request returns.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-1.2","interaction":{"type":"sort","items":[{"text":"The client requests authorization from the resource owner.","why":"The flow begins here, before any grant exists."},{"text":"The client receives an authorization grant.","why":"The grant exists only after the owner has approved the request."},{"text":"The client presents that grant to the authorization server to request a token.","why":"A grant is exchanged for a token, so this request comes once the grant is held."},{"text":"The authorization server validates the grant and issues an access token.","why":"The token is issued only after the grant has been checked."},{"text":"The client presents the access token to the resource server.","why":"The token is used last, to request the protected data."}]},"options":[],"answer":"o:abcde","explanation":"The abstract flow runs in a fixed sequence: the client obtains a grant, exchanges it for an access token, and then uses that token at the resource server.","concept":"The abstract flow runs in a fixed sequence: the client obtains a grant, exchanges it for an access token, and then uses that token at the resource server.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["The steps run from requesting permission, through the grant and the token, to using the token for data."]},{"id":"oauthoidcbeginner-003","courseId":"oauth-oidc-beginner","domain":"authorization-flows","topic":"Authorization code grant","prompt":"A web app receives an authorization code on its callback URL. To exchange that code for an access token, what does the app send to the token endpoint?","hint":"Think about what the token endpoint needs to tie this request to the earlier redirect and to the app.","explain":"The browser carries something back to the app, which then makes a second, direct request to a server. Consider what that second request must prove about the app and how the flow began.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1","interaction":{"type":"single"},"options":[{"id":"a","text":"The code and the redirection URI used earlier, plus its own client authentication.","why":"The client authenticates itself and includes the redirection URI used to obtain the code, so the server can verify the exchange."},{"id":"b","text":"The resource owner's username and password.","whyNot":"Those belong to a different grant; in this flow the owner's credentials never reach the app."},{"id":"c","text":"The code alone; the client ID is not needed.","whyNot":"The client must authenticate with the authorization server, so sending the code alone is not enough."},{"id":"d","text":"The access token from the callback URL.","whyNot":"The callback carries the code, not an access token; the token is what this request obtains."}],"answer":"a","explanation":"The authorization code is exchanged at the token endpoint, where the client authenticates and includes the redirection URI used earlier.","concept":"The authorization code is exchanged at the token endpoint, where the client authenticates and includes the redirection URI used earlier.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["The code is exchanged at the token endpoint, and the client must authenticate for that exchange."]},{"id":"oauthoidcbeginner-004","courseId":"oauth-oidc-beginner","domain":"authorization-flows","topic":"Authorization request parameters","prompt":"A client builds an authorization request URL. Which parameter must it include, with its value set to code?","hint":"Think about the parameter that tells the server what kind of answer to send back.","explain":"Every authorization request is a set of named values added to a URL. The spec labels each one as required, optional, or recommended, and the label says what the server must do when the value is missing.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1.1","interaction":{"type":"single"},"options":[{"id":"a","text":"response_type","why":"The spec marks it REQUIRED, and its value MUST be set to code."},{"id":"b","text":"state","whyNot":"State is only RECOMMENDED; it helps prevent cross-site request forgery but is not mandatory."},{"id":"c","text":"scope","whyNot":"Scope is OPTIONAL; the client may ask for specific access, but the parameter is not mandatory."},{"id":"d","text":"redirect_uri","whyNot":"redirect_uri is OPTIONAL in the request, as described in section 3.1.2."}],"answer":"a","explanation":"Every authorization request carries response_type set to code and a client_id; the other parameters are optional or recommended.","concept":"Every authorization request carries response_type set to code and a client_id; the other parameters are optional or recommended.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["Only response_type and client_id are required in an authorization request; state is recommended."]},{"id":"oauthoidcbeginner-005","courseId":"oauth-oidc-beginner","domain":"authorization-flows","topic":"Authorization code response","prompt":"An authorization server redirects the user back to the app with a code. Which TWO statements about this response does the spec require?","hint":"Look for the wording the spec uses for mandatory rules, not advice.","explain":"A redirect response carries a value back to the app, and the spec attaches rules to it. Some rules are firm requirements; others are only advice on lifetimes and sizes. Notice which words the spec uses.","source":"https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"The client MUST NOT use the authorization code more than once.","why":"The spec states this as a MUST, and a reused code must be denied."},{"id":"b","text":"The client MUST ignore response parameters it does not recognize.","why":"The spec says the client MUST ignore unrecognized response parameters."},{"id":"c","text":"The client may reuse the code until it expires, as long as the same client sends it.","whyNot":"The spec forbids reuse: the code may be used only once."},{"id":"d","text":"A 10-minute code lifetime is required by the spec.","whyNot":"The spec only RECOMMENDS a maximum of 10 minutes, so it is not mandatory."},{"id":"e","text":"The spec fixes the code at a set number of characters.","whyNot":"The code's size is left undefined, so clients should not assume one."},{"id":"f","text":"State is optional even when the client's request included it.","whyNot":"State is REQUIRED in the response when the request included it."}],"answer":"ab","explanation":"The spec uses MUST for the one-time use of the code and for ignoring unknown response parameters, while lifetime is only recommended and size is undefined.","concept":"The spec uses MUST for the one-time use of the code and for ignoring unknown response parameters, while lifetime is only recommended and size is undefined.","rev":1,"updatedAt":"2026-10-26","kind":"scenario","takeaways":["MUST NOT reuse the code; MUST ignore unknown response parameters; the 10-minute lifetime is only recommended."]}]