If, like me, you find yourself conflating OAuth, JWTs and several other acronyms while attempting to integrate OAuth2 with your Spring Boot and Kotlin based APIs, this Jetbrains tutorial by Mdu Sibisi would be an excellent starting point. It provides an easy to understand example of integrating OAuth2 and JWTs, and guides the user through creating a document API (resource server) where tokens are validated using a public key. Therefore, in the absence of an authorization server, the user can validate JWTs locally. This tutorial also covers other aspects of integration like extracting user claims and spring authorization attributes, locking API endpoints with @PreAuthorize annotations, creating a custom JWT decoder for validation and resolution of audience and issuer attributes.
Being able to work through examples of integrating JWTs and OAuth2 with Spring and Kotlin was the major selling point of this tutorial for me.…