JWT Token With Standards

Learn about JWT tokens with standards and MicroProfile specifications with a code example.

Overview

In the lesson “JWT as an Authentication Token,” we used a JWT token for authentication purposes but used a custom-made webFilter instead of Java Enterprise standards. The OpenID Connect standard is part of Jakarta EE 10, which was released in May 2022. MicroProfile can use integrated JWT tokens, similar to the example in the lesson “JWT as an Authentication Token.”

MicroProfile aims to optimize Enterprise Java for a microservices architecture. It is based on the Java EE/Jakarta EE standard plus API specifically for microservices such as REST Client, Configuration, Open API, and so on. These specifications can also be used in many scenarios unrelated to microservices. The MicroProfile JWT specification can be found at this link.

Let's create the example

We use the generator accessible on the website of the MicroProfile starter.

Note: You don’t have to create anything or go anywhere. We’vealready created a working application for you at the end of this lesson.

Get hands-on with 1200+ tech skills courses.