This is a simple example of token based authentication. You can download the project and run it in your system with Visual Studio.
Users can login to the system with predefined usernames and passwords due to simplicity.
If credentials are true they get a JWT token form response.
User must pass this token if he/she wants to use other API endpoints.
Token has an expiry time.
Predefined usernames and passwords:
Id = 1, Username = "Jan", Password = "Janjan"
Id = 2, Username = "Feb", Password = "Febfeb"
Id = 3, Username = "Marc", Password = "Marcmarc"