Amur. Callback behaviour
(amur v0.3.4)
Copy Markdown
Behaviour for handling the result of an OAuth flow.
Implement both callbacks in the module configured by :on_success and
:on_failure. The success callback receives the normalized user and OAuth
token, while the failure callback receives the reason the flow failed.
Summary
Types
@type context() :: %{:user => Amur.User.t(), optional(atom()) => term()}
Callbacks
@callback on_failure(Plug.Conn.t(), term()) :: Plug.Conn.t()
@callback on_success(Plug.Conn.t(), context()) :: Plug.Conn.t()