{"repo":"jangbl/jwt-server-to-server","free":true,"listed":false,"github":"https://github.com/jangbl/jwt-server-to-server","clone":"git clone https://github.com/jangbl/jwt-server-to-server.git","description":"JSON Web Tokens (JWT) server to server communication with Node.js servers","language":"JavaScript","stars":11,"topics":["jwt","jwt-token","jwt-bearer-tokens","jwt-authentication","jwt-middleware","nodejs","server2server","server-to-server","hmac","hmac-sha256"],"license":null,"category":"auth-billing-email","readme_excerpt":"JWT server to server communication in Node.js About This repository is the source code for the JWT server to server communication in Node.js tutorial series on Youtube on YouTube provided by productioncoder.com. Please help this repo with a ⭐️ if you find it useful! 😁 For updates, please follow @ jgoebel on Twitter. 2 How to run this application 2.1 Install dependencies Install the dependencies by running 2.2 HMAC communication To initiate an HMAC server to server communication, you need to spin up two server so they can talk to each other We recommend opening two terminal windows for this. In the first terminal run In the second terminal window run: You now have two servers running on port 3000 and on port 8080 . 2.3. RSA-based server to server communication Make sure that you create two RSA keypairs and paste it in the root directory with the following file names If you do not want to generate an RSA keypair with openssl via the command line, you can use an online service like jsencrypt if you just want to try out the project locally. 2.4. Let the servers talk to each other To let one server send a message to the other server, you can hit the following unprotected REST endpoint with curl or with Postman: Note that both servers support the POST /produce endpoint. Therfore, you can also hit Both servers will not print log messages that indicate that they just exchanged information with JWT tokens in the header. 3 Security To make this communcation truly secure, we would need","default_branch":null,"files":null,"tree":[],"storefront":"/r/jangbl","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jangbl/jwt-server-to-server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}