Autonoma.Refs (Autonoma v0.2.9)

Copy Markdown View Source

JWT-like refs token: header.payload.signature using HMAC-SHA256.

Summary

Functions

Recursively sanitize values that Jason can't encode natively. Converts DateTime, NaiveDateTime, Date, Decimal, and other structs to strings.

Sign a refs payload into a 3-part token string.

Verify and decode a refs token. Returns the payload map or raises.

Functions

sanitize_for_json(dt)

Recursively sanitize values that Jason can't encode natively. Converts DateTime, NaiveDateTime, Date, Decimal, and other structs to strings.

sign(payload, secret)

Sign a refs payload into a 3-part token string.

verify!(token, secret)

Verify and decode a refs token. Returns the payload map or raises.