cobwebhook v0.4.0 Cobwebhook.Adapter behaviour

Link to this section Summary

Callbacks

Parse trusted body into params

Check if request was signed with the given secret

Link to this section Types

Link to this type secret()
secret() :: String.t()
Link to this type secrets()
secrets() :: List.t(secret()) | MapSet.t(secret())

Link to this section Callbacks

Link to this callback parse(conn, body)
parse(conn :: Plug.Conn.t(), body :: Plug.Conn.body()) :: map()

Parse trusted body into params.

Link to this callback verify(conn, body, secret)
verify(conn :: Plug.Conn.t(), body :: Plug.Conn.body(), secret :: secret()) ::
  boolean()

Check if request was signed with the given secret.