Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Flask REST API!
You have completed Flask REST API!
Preview
Users are just the first step. Once you know who someone is, you need to be able to let them in. HTTP Basic Auth is a great solution for this for APIs because it's accessible through HTTP headers and browsers.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
It's a whole lot like being presented
with a login form on a site or
0:00
on your OS but
it comes out in your browser.
0:00
The neat thing about basic auth though
is that you can send your credentials,
0:03
your username and password to it through
HTTP headers which means that our users
0:07
can send their credentials when they
request a protected section of our site.
0:11
Miguel Grinberg created a great
package for doing http based
0:15
auth in a Flask project that handles a lot
of the needs I have on this project.
0:19
A link to the docs for
that in the teacher's notes.
0:24
But, as usual, before I can use it,
I need to install it.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up