oatpp / example-jwt

A complete example of a CRUD service with API secured with JSON Web Token (JWT)
https://oatpp.io/
Apache License 2.0
6 stars 8 forks source link

Change in some functions from JWT #7

Open rauhur opened 1 year ago

rauhur commented 1 year ago

Change in some JWT functions

In the auth/JWT.cpp file, in the line:

payload->userId = decoded.get_payload_claims().at("userId").as_string()

It looks like it should now be:

payload->userId = decoded.get_payload_claim("userId").as_string()

In the file auth/JWT.hpp, in the line:

jwt::verifier<jwt::default_clock, jwt::picojson_traits> m_verifier;

It looks like it should now be something like:

jwt::verifier<jwt::default_clock, jwt::traits::kazuho_picojson> m_verifier;

Losrity commented 6 months ago

yes!it works for me. thanks!