class

LiveView::Token

Inherits Reference < Object

Constants

HMAC_BLOCK = 64

Constructors

new(secret : String)
Source

Instance methods

sign(payload : String) : String
Source
sign(payload : Hash | NamedTuple) : String
Source
verify(token : String) : String | Nil

Returns the payload JSON string, or nil when the signature is bad.

Source
verify_json(token : String) : JSON::Any | Nil
Source