Usher.Token.Signature (Usher v0.5.1)
View SourceHelper functions to sign and verify user-supplied invitation tokens.
Signing tokens is optional and does not change how tokens are stored. Use it when you want to distribute a signature along with a token, so that you can later check for authenticity, before looking up the invitation in the DB.
Summary
Functions
Signs a token string using HMAC-SHA256 and returns a URL-encoded Base64 string.
Verifies a signature against the given token. Signature must've been generated using the given token.
Types
Functions
Signs a token string using HMAC-SHA256 and returns a URL-encoded Base64 string.
Requires config :usher, signing_secret: "..." to be set.
Verifies a signature against the given token. Signature must've been generated using the given token.