Auth & Security interview questions

15 Auth & Security questions from the FastAPI bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is OAuth2PasswordBearer?

Mid
  1. A.named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  2. B.the security class that reads a bearer token from the Authorization header and powers the docs login flow
  3. C.a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  4. D.the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

2. Which term means: "the security class that reads a bearer token from the Authorization header and powers the docs login flow"?

Mid
  1. A.Security scopes
  2. B.Security helper
  3. C.OAuth2PasswordBearer
  4. D.JWT

Answer + AI explanation with Pro

3. Which statement is correct?

Mid
  1. A.OAuth2PasswordBearer — a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  2. B.OAuth2PasswordBearer — named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  3. C.OAuth2PasswordBearer — the security class that reads a bearer token from the Authorization header and powers the docs login flow
  4. D.OAuth2PasswordBearer — the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

4. What is JWT?

Mid
  1. A.a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  2. B.the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized
  3. C.the security class that reads a bearer token from the Authorization header and powers the docs login flow
  4. D.a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request

Answer + AI explanation with Pro

5. Which term means: "a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request"?

Mid
  1. A.Security helper
  2. B.HTTPException
  3. C.Security scopes
  4. D.JWT

Answer + AI explanation with Pro

6. Which statement is correct?

Mid
  1. A.JWT — named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  2. B.JWT — a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  3. C.JWT — a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  4. D.JWT — the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

7. What is Security scopes?

Senior
  1. A.a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  2. B.the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized
  3. C.the security class that reads a bearer token from the Authorization header and powers the docs login flow
  4. D.named permission strings declared on a dependency and checked against a token to enforce fine-grained access

Answer + AI explanation with Pro

8. Which term means: "named permission strings declared on a dependency and checked against a token to enforce fine-grained access"?

Senior
  1. A.Security helper
  2. B.HTTPException
  3. C.Security scopes
  4. D.JWT

Answer + AI explanation with Pro

9. Which statement is correct?

Senior
  1. A.Security scopes — the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized
  2. B.Security scopes — a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  3. C.Security scopes — a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  4. D.Security scopes — named permission strings declared on a dependency and checked against a token to enforce fine-grained access

Answer + AI explanation with Pro

10. What is HTTPException?

Junior
  1. A.the security class that reads a bearer token from the Authorization header and powers the docs login flow
  2. B.a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  3. C.named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  4. D.the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

11. Which term means: "the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized"?

Junior
  1. A.HTTPException
  2. B.Security helper
  3. C.JWT
  4. D.Security scopes

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.HTTPException — named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  2. B.HTTPException — a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  3. C.HTTPException — a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  4. D.HTTPException — the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

13. What is Security helper?

Mid
  1. A.a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  2. B.named permission strings declared on a dependency and checked against a token to enforce fine-grained access
  3. C.a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  4. D.the security class that reads a bearer token from the Authorization header and powers the docs login flow

Answer + AI explanation with Pro

14. Which term means: "a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI"?

Mid
  1. A.Security scopes
  2. B.OAuth2PasswordBearer
  3. C.Security helper
  4. D.HTTPException

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.Security helper — a compact signed token, carrying encoded claims, commonly issued at login and verified on each protected request
  2. B.Security helper — the security class that reads a bearer token from the Authorization header and powers the docs login flow
  3. C.Security helper — a specialized form of Depends that injects a credential provider and also records the scheme in the generated OpenAPI
  4. D.Security helper — the exception raised to return an error response with a chosen status code and detail, such as 401 for unauthorized

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Auth & Security question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers