class Kemal::Hmac::Client

Defined in:

kemal-hmac/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.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


[View source]

Instance Method Detail

def 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


[View source]