Packages

A simple alternative to HTTP Basic Auth for Plug applications

Current section

Files

Jump to
one_auth mix.exs
Raw

mix.exs

defmodule OneAuth.MixProject do
use Mix.Project
@version "0.1.0"
@url "https://github.com/tomkonidas/one-auth"
def project do
[
app: :one_auth,
version: @version,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
name: "OneAuth",
docs: docs(),
package: package(),
description: description(),
dialyzer: dialyzer()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:plug, "~> 1.20"},
{:ex_doc, "~> 0.40", only: :dev, runtime: false, warn_if_outdated: true},
{:makeup_eex, "~> 2.0", only: :dev, runtime: false},
{:makeup_html, "~> 0.2", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
lint: [
"compile --warnings-as-errors",
"format",
"credo --strict",
"dialyzer"
]
]
end
def package do
[
licenses: ["MIT"],
maintainers: ["Tom Konidas"],
links: %{
"GitHub" => @url,
"Changelog" => "#{@url}/releases"
}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @url,
extras: [
"README.md",
"LICENSE",
"guides/configuration.md"
],
groups_for_modules: [
Plugs: [
OneAuth.Plug.LoadSession,
OneAuth.Plug.RequireAuth
],
Internal: [
OneAuth.Config,
OneAuth.Credentials,
OneAuth.Login,
OneAuth.Session
]
]
]
end
defp description do
"A simple alternative to HTTP Basic Auth for Plug applications"
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/one_auth.plt"},
plt_core_path: "priv/plts",
plt_add_apps: [:mix]
]
end
end