schrockwell / bodyguard

Simple authorization conventions for Phoenix apps

Home Page:https://hexdocs.pm/bodyguard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept {module, function} config for callback functions

schrockwell opened this issue · comments

Use case: the :params options in the plug can't access functions that are defined in that module.

So, in addition to accepting params: &get_params/1, also allow params: {__MODULE__, :get_params} and use apply/3 at runtime.

Published in 2.4.0!