Open
Description
It would be nice to have a built-in way to authenticate an API endpoint via HMAC.
I think this should not be very complex in the backend to implement but very useful.
I use System.Security.Cryptography for this.
$hmacsha = New-Object System.Security.Cryptography.HMACSHA256
$hmacsha.key = [Text.Encoding]::ASCII.GetBytes($secret)
$signature = $hmacsha.ComputeHash([Text.Encoding]::ASCII.GetBytes($Body))
$signature = [Convert]::ToBase64String($signature)
I think about something like:
New-PSUEndPoint -Authentication HMAC -Algotithm (SHA256,SHA512,...) -Secret "ClientSecret" -Endpoint ....
Would be great if that could be implemented at some point!
Have a great weekend and thanks for the great work!
regards