QuizzesOAuth2 & SSO with Spring Security — Concept Check
intermediate
spring-boot

OAuth2 & SSO with Spring Security — Concept Check

Questions on OAuth2 & SSO with Spring Security. Spring Security OAuth2 Client enables "Login with Google/GitHub" and SSO; the resource-server mode protects APIs accepting Bearer tokens from an authorisation server.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on OAuth2 & SSO with Spring Security — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer wants to implement 'Login with Google' using Spring Security. What is the first step they should take?

    • AAdd spring-boot-starter-oauth2-client dependency
    • BConfigure JWT validation
    • CSet up a JWKS endpoint
    • DImplement custom UserDetailsService
  2. 2.A service is using Spring Security to protect APIs with JWT. What happens if the JWT token's signature is invalid?

    • AThe request is denied
    • BThe request is allowed but logged
    • CThe token is automatically refreshed
    • DThe request is redirected to login
  3. 3.While setting up OAuth2 SSO with GitHub, a developer notices a 404 error after login. What could be the issue?

    • AMissing client-id
    • BJWKS endpoint misconfiguration
    • CIncorrect callback URL configuration
    • DExpired JWT token
  4. 4.A developer configures a Spring Boot application with OAuth2 Resource Server. They notice unauthorized access to a protected endpoint. What could be missing?

    • AOAuth2 client configuration
    • BProper JWT scope validation
    • COAuth2 login endpoint
    • DCorrect client-id
  5. 5.What does the @PreAuthorize annotation do in a Spring Security OAuth2 Resource Server setup?

    • AHandles token refresh
    • BConfigures OAuth2 login
    • CSets up client registration
    • DChecks JWT scopes/claims for access control
  6. 6.A developer uses the Client Credentials flow for service-to-service calls. What is a key feature of this flow?

    • AUses a refresh token
    • BNo user login is involved
    • CInvolves a callback URL
    • DRequires user interaction
  7. 7.What is the role of the JwtAuthenticationConverter in a Spring Security Resource Server?

    • AHandles OAuth2 login redirection
    • BRefreshes expired tokens
    • CConverts JWT claims to granted authorities
    • DManages client registration
  8. 8.A developer configures an OAuth2 Client with Google but encounters an 'invalid_scope' error. What is likely the problem?

    • AIncorrectly specified scopes
    • BInvalid client-secret
    • CIncorrect token URI
    • DMissing JWT validation