learn hapi — Use JWT With Asymmetric Signatures (RS256 & Co.)

Starting out with JSON Web Token (JWT) is pretty straightforward. Typically, you’ll create a JWT with a secret key and verify it using the same secret. In cryptography, this is a symmetric signature.

Most of the tutorials on the Internet use symmetric algorithms because it’s a simple way to start using JWTs.

JWT also supports asymmetric algorithms using a key pair. This key pair consists of a private and public key. The private key is used to sign a new JWT and the public key is used to verify the signature.

This tutorial shows you how to use JWTs with asymmetric algorithms —like RS256— and authenticate users in your application.

hapi Series Overview

Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.