authable v0.6.2 Authable.Plug.UnauthorizedOnly

Authable plug implementation to refute authencated users to access resources.

Summary

Functions

Plug function to refute authencated users to access resources

Callback implementation for c:Plug.init/1

Functions

call(conn, opts)

Plug function to refute authencated users to access resources.

Examples

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

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

Callback implementation for c:Plug.init/1.