PushEx.Behaviour.Controller behaviour (PushEx v2.1.0)
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(t, map)
Specs
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.