Auth & Security interview questions

15 real Auth & Security questions from the FastAPI bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

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
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Auth & Security free