I’m an enterprise user and can use custom functions. The pointed algorithms in these links doesn’t work and cannot sign a JWT. Because I try the same inputs for JWT signing in another github algorithm and it works. But these doesn’t work:
Based on your ticket with us, you are using RS256 algorithm in the header, but this function will only work for HS256 or HS512. I think the header values in the scenario are the only issue, given that according to the GitHub link you shared, simple HS256 encoding seems to be possible.
Regarding the ‘iml’ error, at the moment it’s not possible to test custom functions that use iml functions in the editor. The iml object is created at scenario runtime, so while the function will not work when testing in the editor, it should run correctly within the scenario. You can test it with a Set Variable module
I can assure you the code is correct. I helped with the update for this page just days ago and I compared the output to jwt.io
Please reply to the ticket you have created if changing the header ALG to HS256 isn’t enough to solve it and I’ll gladly assist you further.