LarkCustomBot.Auth (lark_custom_bot v0.1.0)

View Source

Summary

Functions

sign(payload, config, opts \\ [now: DateTime.utc_now()])

Sign the payload with the secret key.

Examples (Verified)

iex> LarkCustomBot.Auth.parse(%{}, [secret: "abc"], now: ~U[2023-10-01 12:00:00.000000Z])
%{"timestamp" => "1696156800", "sign" => "abc123"}

Options

  • :now - Do not use it. It is used for testing only. Default: DateTime.utc_now().