Rest API - Authentication and AuthorizationWhich of the following is the correct format of the Authorization header for Basic Authentication?AAuthorization: ApiKey base64encodedstringBAuthorization: Bearer base64encodedstringCAuthorization: Token base64encodedstringDAuthorization: Basic base64encodedstringCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall the header format for Basic AuthenticationThe header must start with the word 'Basic' followed by a space and then the base64 encoded credentials.Step 2: Eliminate other header types'Bearer', 'Token', and 'ApiKey' are used in other authentication schemes, not Basic Auth.Final Answer:Authorization: Basic base64encodedstring -> Option DQuick Check:Basic Auth header starts with 'Basic' [OK]Quick Trick: Basic Auth header always starts with 'Basic ' [OK]Common Mistakes:Using 'Bearer' instead of 'Basic'Omitting the space after 'Basic'Confusing with other auth schemes
Master "Authentication and Authorization" in Rest API9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Rest API Quizzes Authentication and Authorization - JWT structure and flow - Quiz 3easy Error Handling - Nested error reporting - Quiz 14medium Error Handling - Validation error details - Quiz 7medium Error Handling - Nested error reporting - Quiz 13medium Error Handling - Validation error details - Quiz 3easy HATEOAS and Linking - Action links for state transitions - Quiz 5medium HATEOAS and Linking - HAL format overview - Quiz 12easy Pagination Patterns - Offset-based pagination - Quiz 13medium Pagination Patterns - Offset-based pagination - Quiz 14medium Rate Limiting and Throttling - Rate limit headers (X-RateLimit) - Quiz 13medium