📌 Have you ever imagined, create your own json web token ?!
That's what I'm doing with this project, it will scale, and get very big, using only php
📌 Is a data transfer system, safely, used via POST and HTTP protocols.
It works in 3 parts, Header, Payload and Signature
-
💬 Header
The header needs two data, the type and the hashing algorithm.
Hash is usually between HMAC, SHA256 or RSA.{ "alg": "SHA256", "typ": "JWT" }
-
💬 Payload
Payload are the objects that will be encrypted, they are the data that will be sent by the HTTP method.
There are 3 types of claims in payloads: reserved, public and private claims.For more information, access:
(JWT) - Learning{ "iss": "127.0.0.13", "exp": 1300819380, "user": "programadriano", "admin": true }
-
💬 Signature
Signature is the junction of all hashes, plus a secret, which is a unique key encrypted by the system.
📌 It's very simple you just need to have the docker and docker-compose installed.
With that installed just run the following command.
$ docker-compose up -d
$ docker-compose exec app ./index.php
🔥 It's very simple