Packages

Library faciliating OpenID authentication flow throughout Phoenix application(s)

Current section

Files

Jump to
keen_auth lib plug authorization_error_handler.ex
Raw

lib/plug/authorization_error_handler.ex

defmodule KeenAuth.Plug.AuthorizationErrorHandler do
alias Plug.Conn
import Conn
@callback call(Conn.t(), :unauthorized | :forbidden) :: Conn.t()
def call(conn, :unauthorized) do
conn
|> send_resp(401, "Unauthorized")
end
end