Fix user option for Bodyguard.Plug.Authorize
schrockwell opened this issue · comments
Rockwell Schrock commented
Need to do something smarter about the user
option in the Bodyguard.Plug.Authorize
plug module. Since the init/1
callback happens at compile-time, we can't provide functions as options because they can't be unwrapped.
The easiest solution is change it to a {module, function}
tuple that gets the current user from the conn.
Rockwell Schrock commented
Never mind - seems to work okay!