You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to construct the Public key from .pem file. I need public key to verify the JWT token.
Here is how i am trying.
Downloaded the .pem file from link - https://{instance}.auth0.com/dbconnections/pem
And the error i am getting,
java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException: ObjectIdentifier() – data isn’t an object ID (tag = -96)
at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:205)
at java.security.KeyFactory.generatePublic(KeyFactory.java:334)
at com.ceino.supportapp.test.JWTClass.getPublicKey(JWTClass.java:93)
at com.ceino.supportapp.test.JWTClass.readPublicKeyFromFile(JWTClass.java:106)
at com.ceino.supportapp.test.JWTClass.main(JWTClass.java:35)
Caused by: java.security.InvalidKeyException: IOException: ObjectIdentifier() – data isn’t an object ID (tag = -96)
at sun.security.x509.X509Key.decode(X509Key.java:397)
at sun.security.x509.X509Key.decode(X509Key.java:402)
at sun.security.rsa.RSAPublicKeyImpl.(RSAPublicKeyImpl.java:86)
at sun.security.rsa.RSAKeyFactory.generatePublic(RSAKeyFactory.java:298)
at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(RSAKeyFactory.java:201)
… 4 more
The text was updated successfully, but these errors were encountered:
Creating new or reading existing keys is not part of this library's responsibilities. I saw Ashish replied to you on the community suggesting the use of jwks-rsa-java for fetching the public keys. Have you tried that?
I am unable to construct the Public key from .pem file. I need public key to verify the JWT token.
Here is how i am trying.
Downloaded the .pem file from link - https://{instance}.auth0.com/dbconnections/pem
And the error i am getting,
The text was updated successfully, but these errors were encountered: