Refer to the exhibit. Which code snippet must be added to the blank in the code to automate the evaluation and handling of errors due to wrong credentials when Basic Authorization is used?
B is correct.
in the 3rd line it says "please login again" which means 403 has been returned.
on the page provided by hatsec
"This status code is similar to the 403 Forbidden status code, except that in situations resulting in this status code, user authentication can allow access to the resource."
403 Forbidden means that the user has logged in with the correct, valid credentials, but is not allowed to access whatever they are attempting to access.
401 Unauthorized means that their credentials are invalid, which is the trigger for the error message you are attempting to generate in the exhibit code snippet.
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
hatsec
Highly Voted 1 year, 3 months agoSzClar
Most Recent 1 year, 3 months agokirrim
6 months, 3 weeks ago[Removed]
1 year, 2 months agoxChdjdufurpew
1 year, 2 months agoi9t6
10 months, 2 weeks ago