Is there a simple way to sign http requests with JWS?

I would like to sign http requests that VUs do with JWS. Is there a way to do so easily in k6?
Thanks

Hi David,

If this is specifically about working with JSON Web Tokens (JWTs), then this SO article may point you in the right direction.

Thanks for the JS link. In the end, I used a Go extension (xk6) to sign my requests and it works great. I think it’s the easiest way to do it, as there are nice packages for this and it’s fast.

hello
what extention did you use?

Yes, you can sign HTTP requests in k6 using JSON Web Signature (JWS), but k6 doesn’t provide native support for JWS signing directly. However, you can accomplish it by leveraging JavaScript libraries compatible with k6, such as jose or crypto-js.