Implementing JWT

Let's consider the identity app once again. We implemented IdentityStore and AuthMechanism to authenticate the user, and then provided access to the user to invoke the /organization endpoint.

We will modify this project to demonstrate the JWT. We will also add a new /login resource, which takes the user ID and password in the header, and validates it against IdentityStoreas explained earlier. Let's write this sequence to understand what we intend to do:

As shown in the preceding sequence diagram,  /login is the entry point that takes the user's credentials, which we then validate using the IdentityStore, before generating ...

Get Kotlin for Enterprise Applications using Java EE now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.