Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed REST API Authentication with Express!
Instruction
Parse the Authorization Header
Writing a helper function to parse the user's credentials from the Authorization header manually can help gain a deeper understanding of how Basic Authentication works. But in general, it's preferable not to have to write code that someone else has already written (and presumably tested) for you.
In this step, we'll use the basic-auth npm package to do all of the user credential parsing for us...