200-901 · Question #149
A REST API service requires authentication based on the username and password. The user "john" has the password "384279060" and the Base64 encoding of those credentials is "am9objowMTIzNDU2Nzg="…
The correct answer is D. The header must include. HTTP Basic Authentication requires Base64-encoded credentials to be transmitted in the Authorization request header, not in the request body. The correct format is 'Authorization: Basic <base64-encoded-credentials>'.
Question
A REST API service requires authentication based on the username and password. The user "john" has the password "384279060" and the Base64 encoding of those credentials is "am9objowMTIzNDU2Nzg=". Which method completes an authentication request?
Options
- AThe header must include:
- BThe payload must include:
- CThe payload must include.
- DThe header must include:
How the community answered
(46 responses)- A2% (1)
- B4% (2)
- C7% (3)
- D87% (40)
Why each option
HTTP Basic Authentication requires Base64-encoded credentials to be transmitted in the Authorization request header, not in the request body. The correct format is 'Authorization: Basic <base64-encoded-credentials>'.
Although choice A references a header, it does not represent the correctly formatted or complete Authorization header required by the Basic Authentication scheme as defined in RFC 7617.
HTTP Basic Authentication credentials must be transmitted in the Authorization request header, not in the request body payload; placing credentials in the body is not part of the Basic Auth scheme.
HTTP Basic Authentication credentials must be transmitted in the Authorization request header, not in the request body; the Basic Auth scheme defined in RFC 7617 specifies header-based credential delivery exclusively.
RFC 7617 defines HTTP Basic Authentication as requiring credentials to be placed in the Authorization HTTP request header using the 'Basic' scheme followed by the Base64-encoded 'username:password' string. For user 'john' with password '384279060', the correct header is 'Authorization: Basic am9objowMTIzNDU2Nzg=' - this must be a header, not a body payload.
Concept tested: HTTP Basic Authentication Authorization header format
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#basic_authentication_scheme
Topics
Community Discussion
No community discussion yet for this question.