class Kemal::Hmac::Token

Defined in:

kemal-hmac/token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(subject : String, resource : String, timestamp : String, algorithm : OpenSSL::Algorithm | Nil = nil) #

subject the subject of the token (String) resource the resource of the token (String) timestamp the timestamp of the token (String)


[View source]

Instance Method Detail

def hexdigest(secret : String) : String #

Build an HMAC token with the given secret secret the secret used to build token returns HMAC token (hexdigest)


[View source]