class

Kemal::Hmac::Client

Inherits Reference / Object

Constructors

new(client : String, secret : String, algorithm : String | Nil = "SHA256")

client the client name which will be sending HTTP requests to the server using HMAC auth (String) secret the secret used to generate the HMAC token in relation to the client (String) algorithm the algorithm used to generate the HMAC token (String) - defaults to SHA256

Source

Instance methods

generate_headers(path : String) : Hash(String, String)

A public helper method to generate the HMAC headers for a given path Use this method to get pre-filled headers to send with your request to the server path the path (HTTP path) to generate the headers for (String) - e.g. "/api/path" returns a Hash of the HMAC headers

Source