pokowaka/jwt-cpp

jwks and public key

Opened this issue · 0 comments

Hello, do you guys know if this library can have a public key as signer and if so in which format? I'm trying an implementation with resource server and everything works fine, I can extract the issuer(https://dev-yfmih6k427k181x8.uk.auth0.com/.well-known/jwks.json) and from that url I can get the public key which is n + e but I get this error when I contruct the signer
RS256Validator signer(publicKey); I get this error
Unable to construct public key due to: error:1E08010C:DECODER routines::unsupported
I tried to pass the public key in PEM format
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4Uf4+kyyfryE9Hbf8fRx
yOxvvUPGfRM492rwOKdoGF91ZQD5z4WL2yWhEA8rpxQWjTZjh9dY+iuTdgDCOShF
u4x95491mpTsZPpQPuNX90jU4SxdmJ6ocp4hRttSXT+3Fd5Eec/4IZ3g5B8JVvWE
aArINQ5lZ9I0ZQVO4t/3udyBhaqGv0z+K/sRBysMmLn2P6ls/jn8y9ycEUMUupNr
Zuln9mFysgfPfus2bYGtQJgajXFDR5slxC3X/6AqZGpSZKpe9Fs85R23ssSl3N5n
r6Ru88u/r8h10bXflewb8L7ww/hVPUUVOXAN0P2AnyC7FJBoQBkcwQfemhTSj8kv
awIDAQAB
-----END PUBLIC KEY-----
any suggestions?