<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Verification of ID Token using RSA public key]]></title><description><![CDATA[<p dir="auto">Hey All<br />
Just wondering if I am doing something wrong here. I am using FusionAuth java library <a href="https://github.com/FusionAuth/fusionauth-jwt" rel="nofollow ugc">https://github.com/FusionAuth/fusionauth-jwt</a>.</p>
<p dir="auto"><strong>Java Code :</strong></p>
<pre><code>    ```List&lt;JSONWebKey&gt; keys = JSONWebKeySetHelper.retrieveKeysFromJWKS("http://localhost:9011/.well-known/jwks.json");
    Map&lt;String, Verifier&gt; publicKeyVerifiers = new HashMap&lt;String,Verifier&gt;();
    for (JSONWebKey key : keys) {
        String publicKey = key.x5c.get(0);
        Verifier verifier = RSAVerifier.newVerifier(publicKey); 
        String kid = key.kid;
        publicKeyVerifiers.put(kid, verifier);
    }```
</code></pre>
<p dir="auto"><strong>Exception I am getting :</strong><br />
InvalidParameterException : Unexpected PEM Format</p>
<p dir="auto">I think the problem here is that if we look at the "key.x5c" from jwks.json, it does not start with "-----BEGIN" and hence it is throwing above exception.<br />
The FusionAuth library class <strong>io.fusionauth.pem.PEMDecoder</strong> expect "-----BEGIN" which does not exist.<br />
<strong>Screenshot of jwks.json</strong></p>
<p dir="auto"><img src="/community/forum/assets/uploads/files/1644951984867-90cedaa7-e260-4ea5-8a51-1f58fb3a9976-image.png" alt="90cedaa7-e260-4ea5-8a51-1f58fb3a9976-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://fusionauth.io/community/forum/topic/1519/verification-of-id-token-using-rsa-public-key</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 13:44:14 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/1519.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Feb 2022 18:58:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Verification of ID Token using RSA public key on Thu, 17 Feb 2022 03:21:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/1401">@gokul-mahajan20</a></p>
<p dir="auto">Can you add <code>----BEGIN</code> to the JWKS certs?</p>
]]></description><link>https://fusionauth.io/community/forum/post/4365</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/4365</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 17 Feb 2022 03:21:22 GMT</pubDate></item></channel></rss>