I need upgrade my
guardian dependency version ( 0.14 to 1.0).
Can someone give an advice how I can make this (link, guide, instruction, etc).
Thanks for advance.
I have done it, it wasn’t so hard without any guide. The main thing that I did is to read a new description about 1.0 version and compare your code with examples. If you need any assistance, just ping me in
elixir-lang slack. My username there is same as here
Upgrade guide is available in the Github repo:
This file has been truncated.
# Upgrade guide 0.14.x to 1.0
The move from 0.14.x to 1.0 is significant behind the scenes. Although we've tried to keep backwards compatibility where we could, in order to move Guardian forward we've had to make some breaking changes.
Guardian is no longer constrained to using only JWT. Although it provides all the JWT behaviour out of the box that it used to, you can now add your own types of tokens.
Dependencies on Phoenix and Plug have been made optional so that Guardian can be used in a more stand-alone manner.
In 0.14.x Guardian was a single, globally unique implementation. In 1.0 you'll need to define a module where all your authentication related items live. You'll also interact with this module rather than directly with Guardian (unless you're a library developer).
The **Implementation** module is the serializer and provides a place for you to put `Hooks`. To create the implementation:
defmodule MyApp.Guardian do
use Guardian, otp_app: :my_app
Thanks for linking the upgrade guide! I totally didn’t see that when I was looking at the repository yesterday so I created a PR to add links to it
Edit: and it’s merged!