Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

RSA-SHA256 JWT in Javascript

Not applicable

Hi,

Is there any JavaScript code are available to generate JWT in for RSA-SHA256 based on jwt.io.

Actually i am able to create header and claims but unable to create signature for RSA-SHA256.

while i am able to create JWT for SHA256 by Javascript.

Regards,

Solved Solved
2 9 3,274
1 ACCEPTED SOLUTION

Not applicable

Three options here:

  • Use JS pure libraries: jsrassign or jsjws. I haven't tried them though, so can't confirm they work properly.
  • Use auth0/jsonwebtoken, which runs on Node.js. With this option, you'll require to deploy a Node.js API Proxy, which can still run policies and set context variables.
  • Implement a Java Callout leveraging auth0/java-jwt. Similar to Node.js you can set context variables to continue to leverage your regular policies without impacting your current codebase.

Give them a try and let us know your results.

View solution in original post

9 REPLIES 9