【发布时间】:2019-04-12 23:03:14
【问题描述】:
我对@987654321@ 和Phoenix 非常陌生,我正在尝试使用{:comeonin, "~> 4.0"} 和{:guardian, "~> 1.0"} 对我的应用程序进行身份验证,并有一个帮助函数来检查用户是否已登录:
defmodule Chatter.ViewHelper do
def current_user(conn), do: Guardian.Plug.current_resource(conn)
def logged_in?(conn) do
Guardian.Plug.authenticated?(conn)
end
end
但我收到此错误:
** (UndefinedFunctionError) function Guardian.Plug.authenticated?/1 is undefined or private.
【问题讨论】:
标签: elixir phoenix-framework guardian