200-901 · Question #443
A REST API service requires basic authentication. A user's credentials are "ned/33662255" and the Base64 encoding of the credentials is "a2lsbGE6NDU4ODI5". Which requirement must be met for a…
The correct answer is A. The header must include. HTTP Basic Authentication requires the client to include an Authorization header in the HTTP request - not in the payload/body. The correct header format is: Authorization: Basic <Base64-encoded-credentials>. The Base64 string encodes the username:password pair. Placing…
Question
A REST API service requires basic authentication. A user's credentials are "ned/33662255" and the Base64 encoding of the credentials is "a2lsbGE6NDU4ODI5". Which requirement must be met for a request to be authenticated?
Options
- AThe header must include:
- BThe payload must include:
- CThe header must include:
- DThe payload must include:
How the community answered
(33 responses)- A91% (30)
- C6% (2)
- D3% (1)
Explanation
HTTP Basic Authentication requires the client to include an Authorization header in the HTTP request - not in the payload/body. The correct header format is: Authorization: Basic <Base64-encoded-credentials>. The Base64 string encodes the username:password pair. Placing credentials in the payload (options B and D) is incorrect for Basic Auth - the server reads the Authorization header, not the body. Basic Auth is a header-based mechanism defined in RFC 7617.
Topics
Community Discussion
No community discussion yet for this question.