arun11299 / cpp-jwt

JSON Web Token library for C++
MIT License
396 stars 111 forks source link

verify list in audience claim #44

Closed XM37 closed 5 years ago

XM37 commented 5 years ago

Hi,

i will verify an item inside the audience claim. How can i do this?

A short example:

"aud": [
    "normal_user",
    "https://dev.eu.auth0.com/userinfo"
  ],

how can i verify one of these items inside the JWT token?

I have following decoding statement in my code: jwt::decode(token, jwt::params::algorithms({algorithm}), jwt::params::aud("normal_user"), jwt::params::secret(key), jwt::params::verify(true));

But if I run these piece of code I will receive following error code:

type conversion error

arun11299 commented 5 years ago

Will take a look at it tomorrow.

arun11299 commented 5 years ago

Hi, I am not able to reproduce the same issue. There seems to be issue with your JSON data types. An example being the "InvalidIATTest" test.

Can you give me a complete example ?

Thanks.

arun11299 commented 5 years ago

@XM37 Is it still an issue ?