View Source Webhoox.Authentication.StandardWebhook (Webhoox v0.3.0)

Standard Webhook Authentication (verify and sign) Read more here: https://standardwebhooks.com

Summary

Functions

Sign a Standard Webhook given an id, timestamp, payload and secret

Verify a Standard Webhook given a Plug.Conn, payload and secret

Functions

Link to this function

sign(id, timestamp, payload, secret)

View Source
@spec sign(
  id :: String.t(),
  timestamp :: integer(),
  payload :: map(),
  secret :: binary()
) :: String.t()

Sign a Standard Webhook given an id, timestamp, payload and secret

Link to this function

validate_timestamp(timestamp)

View Source
Link to this function

verify(conn, payload, secret)

View Source
@spec verify(Plug.Conn.t(), map(), binary()) :: boolean()

Verify a Standard Webhook given a Plug.Conn, payload and secret