reading-notes

Reading Notes

View the Project on GitHub simon-panek/reading-notes

Code 401: Class 06 - Authentication


Questions

  1. Singleton an object that can only be instantiated one time

  2. How to use singleton pattern with Node modules and classes? use a constructor to build a class for the singleton that will only allow one instance to be created. Before creating, check to see if one already exists, if so use that one. If not, instantiate.

  3. What approach to use in designing an Express-like middleware? use the basic format function myCustomMiddleware(req, res, next){//custom middleware} then use it by calling app.use(myCustomMiddleware

Vocabulary

Read: Securing Passwords

Read: Basic Auth

Read: Intro to JWT


HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret)

Read: OWASP auth cheat sheet

Read: bcrypt docs


Return to reading-notes Deployed Site

Return to reading-notes Mark Down