An open API service indexing awesome lists of open source software.

https://github.com/darinm223/jwt-scotty

Simplified JWT example from https://github.com/eckyputrady/haskell-scotty-realworld-example-app
https://github.com/darinm223/jwt-scotty

Last synced: 12 months ago
JSON representation

Simplified JWT example from https://github.com/eckyputrady/haskell-scotty-realworld-example-app

Awesome Lists containing this project

README

          

A self-contained example of JWT authentication with Scotty. Everything other than the JWT authentication parts is simplified for easier understanding.

To build the project, you need to have GHC 8.6.5 installed through ghcup and cabal 3.0 installed. Run `cabal build` and `cabal exec jwt-scotty` to start the server.

Logging in as a user and being granted a token:

![Screenshot](/images/login.png)

Using the token to verify logged-in user:

![Screenshot](/images/validation.png)