{"repo":"kemalcr/kemal-hmac","free":true,"listed":false,"github":"https://github.com/kemalcr/kemal-hmac","clone":"git clone https://github.com/kemalcr/kemal-hmac.git","description":"HMAC middleware for Kemal applications","language":"Crystal","stars":19,"topics":["authentication","crystal-lang","hmac","kemal","shard"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"kemal-hmac HMAC middleware for Crystal's kemal framework About Why should I use HMAC in a client/server system with kemal? Here are some of the benefits: - Data Integrity : HMAC ensures that the data hasn't been tampered with during transit - Authentication : Verifies the identity of the sender, providing a level of trust in the communication - Keyed Security : Uses a secret key for hashing, making it more secure than simple hash functions - Protection Against Replay Attacks : By incorporating timestamps, HMAC helps prevent the replay of old messages This readme will be broken up into two parts. The first part will cover how to use the server middleware in a kemal application. The second part will cover how to use the client to communicate with a server that uses the middleware. Quick Start ⭐ Installation Simply add the shard to your shard.yml file: Basic Example The most basic example possible enabling HMAC authentication for all routes in a kemal application: Server Usage First, you must require the kemal-hmac shard in your kemal application and call it: In a new terminal, you can send a request into the kemal server and verify that HMAC authentication is working: Authentication for specific routes The Kemal::Hmac::Handler inherits from Kemal::Handler and it is therefore easy to create a custom handler that adds HMAC authentication to specific routes instead of all routes. kemal authorized client? When a request is made to a protected route, the kemal authorized client? met","default_branch":null,"files":null,"tree":[],"storefront":"/r/kemalcr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kemalcr/kemal-hmac/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}