php class to generate and validate jwt tokens.
to execute the project
docker-compose up
first instantiate the object passing the secret key to the class constructor to generate the token signature.
the object instance has access to the generate method where you pass the payload and generate the token.
the generate method's answer is this:
you also have access to the decode method, where it validates the signature and returns if the token is valid
the response of the decode method is equal to: