Wrapping Up

This chapter has been challenging, but we have come a long way. Let’s take stock:

  • We used our existing Accounts context to look up session users.

  • We added the pbkdf2_elixir dependency to our project for password hashing.

  • We built our own authentication layer.

  • We built the associated changesets to handle validation of passwords.

  • We implemented a module plug that loads the user from the session and made it part of our browser pipeline.

  • We implemented a function plug and used it alongside some specific actions in our controller pipeline.

In the next chapter, you’ll dive deeper into Ecto’s waters by exploring relationships. We’ll also begin to flesh out our application, using code generators to speed us along.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.120.136