An example API in Go integrated with JSON Web Token for Go to perform JWT verification and validation for API Authorization.
Set appropriate config in api/.env
Build and run the Docker image.
docker build -t go-api .
docker run --name go-api -p 8080:8080 go-api
NOTE: The example uses the RS256
algorithm by default. The code can be modified to support others and there's a method that implements the EdDSA algorithm that can be invoked.
This repository is documented and described in the Securing a Go API with JWTs article.
Pull requests are welcome. To do so, just fork this repo, and submit a pull request.
The files and resources maintained in this repository are licensed under the Apache 2 license.
Please visit curity.io for more information about the Curity Identity Server.
Copyright (C) 2021 Curity AB.