A pet project showing how to provide JWT using a Ktor service.
- Server Configuration
- Utils
- JWT
We first fire off our server with a Netty engine configuration. It is in this server's application pipeline that we shall add our functionalities/ plugins.
In here we have the Kmongo database which we use to store our users. Also hosted in here is our token manager class that reads properties from a config file from our projects resources.
Using the token manager above, we verify tokens inside the authentication config block in our server's application line.