Bird
Raised Fist0

Which of the following correctly represents the Authorization header format for Basic Authentication?

easy📝 Syntax Q3 of Q15
Rest API - Authentication and Authorization
Which of the following correctly represents the Authorization header format for Basic Authentication?
AAuthorization: Basic <base64_encoded_username_colon_password>
BAuthorization: Bearer <token>
CAuthorization: Digest username:password
DAuthorization: Token <username_password>
Step-by-Step Solution
Solution:
  1. Step 1: Recall Basic Auth header format

    The header uses 'Basic' followed by a base64 encoded string of 'username:password'.
  2. Step 2: Eliminate other options

    Bearer is for token auth, Digest is a different scheme, Token is not standard for Basic Auth.
  3. Final Answer:

    Authorization: Basic <base64_encoded_username_colon_password> -> Option A
  4. Quick Check:

    Basic Auth header starts with 'Basic' + base64 string [OK]
Quick Trick: Basic Auth header = 'Basic' + base64(username:password) [OK]
Common Mistakes:
MISTAKES
  • Using 'Bearer' instead of 'Basic'
  • Not encoding credentials in base64
  • Confusing Basic with Digest authentication

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes