replace coherence with guardian
This commit is contained in:
8
lib/eventos_web/auth_error_handler.ex
Normal file
8
lib/eventos_web/auth_error_handler.ex
Normal file
@@ -0,0 +1,8 @@
|
||||
defmodule EventosWeb.AuthErrorHandler do
|
||||
import Plug.Conn
|
||||
|
||||
def auth_error(conn, {type, _reason}, _opts) do
|
||||
body = Poison.encode!(%{message: to_string(type)})
|
||||
send_resp(conn, 401, body)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user