mellon alternatives and similar packages
Based on the "Framework Components" category.
Alternatively, view mellon alternatives based on common mentions on social networks and blogs.
-
ex_admin
ExAdmin is an auto administration package for Elixir and the Phoenix Framework -
phoenix_ecto
Phoenix and Ecto integration with support for concurrent acceptance testing -
absinthe_plug
Plug support for Absinthe, the GraphQL toolkit for Elixir -
phoenix_live_reload
Provides live-reload functionality for Phoenix -
params
Easy parameters validation/casting with Ecto.Schema, akin to Rails' strong parameters. -
phoenix_pubsub_redis
The Redis PubSub adapter for the Phoenix framework -
dayron
A repository `similar` to Ecto.Repo that maps to an underlying http client, sending requests to an external rest api instead of a database -
phoenix_token_auth
Token authentication solution for Phoenix. Useful for APIs for e.g. single page apps. -
rummage_phoenix
Full Phoenix Support for Rummage. It can be used for searching, sorting and paginating collections in phoenix. -
sentinel
DEPRECATED - Phoenix Authentication library that wraps Guardian for extra functionality -
plug_rails_cookie_session_store
Rails compatible Plug session store -
phx_component_helpers
Extensible Phoenix liveview components, without boilerplate -
multiverse
Elixir package that allows to add compatibility layers via API gateways. -
filterable
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL. -
scrivener_headers
Scrivener pagination with headers and web linking -
better_params
Cleaner request parameters in Elixir web applications ๐ -
access pass
provides a full user authentication experience for an API. Includes login,logout,register,forgot password, forgot username, confirmation email and all that other good stuff. Includes plug for checking for authenticated users and macro for generating the required routes. -
phoenix_pubsub_rabbitmq
RabbitMQ adapter for Phoenix's PubSub layer -
plug_checkup
PlugCheckup provides a Plug for adding simple health checks to your app -
plug_rest
REST behaviour and Plug router for hypermedia web applications in Elixir -
Votex
Implements vote / like / follow functionality for Ecto models in Elixir. Inspired from Acts as Votable gem in Ruby on Rails -
trailing_format_plug
An elixir plug to support legacy APIs that use a rails-like trailing format: http://api.dev/resources.json -
plug_canonical_host
PlugCanonicalHost ensures that all requests are served by a single canonical host.
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of mellon or a related project?
Popular Comparisons
README
Mellon
An authentication module for Plug applications.
Intallation
defp deps do
[{:mellon, "~> 0.1.1"}]
end
How to use
See /examples for a working example.
defmodule MyApp do
import Plug.Conn
use Plug.Builder
plug Mellon, validator: {MyApp, :validate, []}, header: "X-AUTH"
plug :index
def validate({conn, token}) do
case token do
"ValidToken" -> {:ok, {"userdata"}, conn}
_ -> {:error, [], conn}
end
def index(conn, _opts) do
send_resp(conn, 200, "Secure area")
end
end
To authenticated for this example using curl you might do the following:
curl --header "X-AUTH: Token: ValidToken" localhost:4000/hello
Configuration
You can configure some parameters while initializing Mellon.
Required
validator
: The function that validates the token. Must return {:ok, userdata, conn} if valid and {:error, conn} if not.
Optional
header
: The http header used for tokens. Will default to 'Authorization'.
block
: Boolean representing if we should return a 401 and stop the chain, if the user is unauthenticated. set block: false, and you can handle displaying a message, oredirecting from the controller.
Return object from validator
The validator can return some options.
All requests that are authenticated should return
{:ok, cargo, conn}
cargo can be any object that you would like to pass along. it will be assigned to the request so you can access it later in your controller.
It will be assigned to :credentials
. To access it later you could do the following: conn.assigns[:credentials]
.
If authentication fails you should return {:error, options, conn}
.
Where options is a Keyword
containing status:
and message
.
Both are optional.
In case you want a custom Unauthenticated message include [message: 'Get out of here!']