Current section
Files
Jump to
Current section
Files
lib/servicex/authenticator/authenticate_error_handler.ex
defmodule Servicex.AuthenticateErrorHandler do
@moduledoc false
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