![]() However to understand all these functionalities you still need to read quite a bit of documentation, maybe some article explaining it a bit deeper, and run tests while working with the code. Thus it gives you the flexibility you need and also doesn’t stop the momentum while building your project. It also speeds up the process of building authentication. Mix lies between building your own solution and using external ones. It puts them directly into your application directory, instead of hiding them behind macros and in the dependency code. Instead of hiding code behind macros and in the complicated dependency code it generates basic files, which should be clear and transparent for anyone who worked in Phoenix. That is the origin of mix, which has been turned into a package by Aaron Renner. “I realized that the best authentication framework is no authentication framework at all.” - José Valim ![]() In early 2020 José Valim added a pull request to the Phoenix repository, explaining it with wise words. #3 Using a native Phoenix solution - mix ![]() It may require additional work to adjust your code to these patches. These may ship with some breaking changes. You should always have them updated, at least to the last minor change. Therefore there is another downside of using external solutions, which is maintenance and keeping your dependencies up to date. Understanding them can be crucial to adjusting its functionalities to your needs.Īnd as I said before, Elixir is still a young, developing language. Pow for example uses a few macros to work. You have to dig through a lot of documentation to know what is going on underneath. It generates ready chunks of code and indeed is comfortable unless you need complex login options.īut there is always a cost of using such a powerful tool. One of such solutions is Pow, described as robust, modular and expandable. Those ready solutions often also include authorization. Using external dependencies is probably the fastest solution if you need something generic. But sometimes, for custom applications, where flexibility and a large number of possibilities to develop the project is really important, your own authentication solution really might be a fit. It takes quite a while to implement and test it. Apart from Elixir having an active, helpful and growing community, there are still some missing or unfinished dependencies, which would help a lot while developing applications.Īuthentication, however, is such a fundamental thing, that there are some powerful solutions available.īuilding your solution is the most time-consuming of all possibilities. In Elixir we are used to building our own solutions. Authorization and authentication in an Elixir/Phoenix uptime monitor: scenarios #1 Building own solution But first of all, we need to distinguish them - which for some might seem trivial, but I have seen too many people mixing up two of them.įor me that is the most basic distinction:Īuthorization is the process of checking if a given user has the access rights to given resources.Īuthentication, on the other hand, is the act of verifying a user’s identity. In this episode, we will add authorization and authentication to our application. Welcome to the second part of our Elixir/Phoenix tutorial series. What are authorization and authentication? Building authentication and authorization with mix.Authorization and authentication in an Elixir/Phoenix uptime monitor: scenarios.What are authorization and authentication?.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |