PushEx v1.0.0-rc3 PushEx.Behaviour.Controller behaviour
Implementable functions that are used by the API controller. It is crucial to ensure that all API calls are secured behind proper auth.
Link to this section Summary
Callbacks
Accepts a Plug.Conn and params map to determine if the API is allowed to be accessed. It is possible to modify
the response Plug.Conn completely, or return simple :ok | :error
atoms
Link to this section Callbacks
Link to this callback
auth(arg0, map)
auth(Plug.Conn.t(), map()) :: :ok | {:ok, Plug.Conn.t(), map()} | :error | {:error, Plug.Conn.t()}
Accepts a Plug.Conn and params map to determine if the API is allowed to be accessed. It is possible to modify
the response Plug.Conn completely, or return simple :ok | :error
atoms.