Code Monkey home page Code Monkey logo

Comments (4)

Thalhammer avatar Thalhammer commented on July 21, 2024 2

As you can see the private key you use is encrypted, which means you need to provide the password (or decrypt the key).
If you take a look at the constructor of rs*, it takes additional optional passwords.
Try the following:

auto verifier = jwt::verify()
.allow_algorithm(jwt::algorithm::rs256{ publicKey, privateKey, "", "<your privatekey password>" });

with_issuer makes sure the token has the iss property set and checks if it matches the provided value. The iss property is normally used to identify the service creating the token.

from jwt-cpp.

Thalhammer avatar Thalhammer commented on July 21, 2024 1

Can I close this, or are there still open questions ?

from jwt-cpp.

eric72 avatar eric72 commented on July 21, 2024

Thanks for your reply, sorry for my late reply.
Yes you right, sorry i was so dumbt lol, thanks for your help.
Code well documented, it's a pleasure.
I just have to get the response now, if token is valid i do this code or not, this, and get the payload of my token too.

from jwt-cpp.

eric72 avatar eric72 commented on July 21, 2024

Thanks for your help, sorry for the late reply, we can close this

from jwt-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.