Schedule > User Authentication using JSON Web Tokens
Week 6: Wed, May 5
Today we’re going to learn how to ensure that only authorized users are able to access your web resources. There are a couple of different steps associate wit this process:
- Creating a way to register and store usernames and passwords.
- This will follow a very similar process to how we’ve been storing and retrieving doctors and companions.
- Creating a method of figuring out whether a user requesting a resource is authenticated by your system.
- This will involve using JWTs (JavaScript Web Tokens) that require that a client embed a web token – issued by the server – in its request header.
- Creating a way to revoke access (by making it so the token times out).
The assigned videos are very instructive, and I highly recommend them (don’t skip these readings – they’re important).
Slides
Lecture Video(s)
- Recorded Lecture Video (51:38)
Readings
- Cook, Kyle What Is JWT and Why Should You Use JWT. Web Dev Simplified.
-
Cook, Kyle
JWT Authentication Tutorial - Node.js.
Web Dev Simplified.
This is a nice Node.js code walkthrough of the key ideas of JWTs. -
Introduction to JSON Web Tokens.
This is a reference doc for learning more about the technical specification.