How to create JWE in pre-request script

I would like to know how can I create JWE in pre-request script. I am using jsrsasign library to sign jwt but it doesn’t support JWE.
I have found one library jose but I am not able to find CDN which can be used to load library in the global variable. Is there any other option ?

Anyone ever successfully created JWE in pre-request script ?

1 Like

Have you found a solution for that? I’m struggling with the same problem.

I am not able to find CDN which can be used to load library in the global variable

on https://cdnjs.com/libraries/jose
e.g. https://cdnjs.cloudflare.com/ajax/libs/jose/4.10.4/index.umd.min.js

on panva/jose CDN by jsDelivr - A free, fast, and reliable Open Source CDN
e.g. https://cdn.jsdelivr.net/gh/panva/jose@4.10.4/dist/browser/index.bundle.min.js

1 Like

Tried this but now running into an error that “Error: crypto is not defined”. Any thoughts on how to resolve this?

I haven’t tried it, but may be @PanvA can help ?

1 Like