gandalf v0.2.0 Gandalf.Plug.UnauthorizedOnly

Gandalf plug implementation to refute authencated users to access resources.

Summary

Functions

Plug function to refute authencated users to access resources

Functions

call(conn, opts)

Plug function to refute authencated users to access resources.

Examples

defmodule SomeModule.AppController do
  use SomeModule.Web, :controller
  plug Gandalf.Plug.UnauthorizedOnly when action in [:register]

  def register(conn, _params) do
    # only not logged in user can access this action
  end
end
init(list)