How can I validate the RSA signature of JWT tokens in ServiceNow scripted REST APIs?

JosephAn
Tera Contributor

I want to create a scripted REST API that accepts JWT tokens generated by our organization's Authorization Server. Since I can't use external libraries, I need to use the JWKS endpoint (well-known URL) to get the public keys and validate the signature of the incoming JWT token. How can I use the modulus (n) and exponent (e) from the matching key I get from the JWKS endpoint to build the RSA public key and verify the token?

0 REPLIES 0