0
0
HLDsystem_design~5 mins

API authentication (OAuth, JWT, API keys) in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main purpose of API authentication?
API authentication ensures that only authorized users or systems can access the API, protecting data and services from unauthorized use.
Click to reveal answer
beginner
Explain OAuth in simple terms.
OAuth is a way to let users give permission to apps to access their data without sharing passwords. It uses tokens to grant limited access.
Click to reveal answer
intermediate
What is a JWT and what does it contain?
JWT (JSON Web Token) is a compact token that contains encoded information like user identity and permissions, signed to prevent tampering.
Click to reveal answer
intermediate
How do API keys differ from OAuth tokens?
API keys are simple static strings used to identify the client, while OAuth tokens are dynamic, time-limited, and can carry user permissions.
Click to reveal answer
beginner
Why is it important to use HTTPS with API authentication?
HTTPS encrypts data between client and server, protecting sensitive authentication tokens and credentials from being stolen by attackers.
Click to reveal answer
Which of the following is a key feature of OAuth?
AAllows users to share passwords with third-party apps
BUses tokens to grant limited access without sharing passwords
CIs a static API key used for client identification
DEncrypts data between client and server
What does a JWT typically include?
AUser credentials in plain text
BEncrypted user password
CEncoded user identity and permissions with a signature
DA static API key
API keys are best described as:
AStatic strings identifying the client
BDynamic tokens with expiration
CEncrypted user passwords
DOAuth authorization codes
Why should API authentication always use HTTPS?
ATo speed up API responses
BTo store tokens on the client
CTo allow anonymous access
DTo encrypt authentication data and prevent interception
Which authentication method allows users to grant limited access to their data without sharing passwords?
AOAuth
BBasic Authentication
CAPI keys
DJWT
Describe how OAuth works to authenticate API requests.
Think about how apps ask for permission to use your data.
You got /4 concepts.
    Explain the differences between API keys, JWT, and OAuth tokens.
    Consider how each method handles security and access control.
    You got /3 concepts.