Skip to content

curityio/go-api-jwt-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Validate JWTs in Go

Quality Availability

An example API in Go integrated with JSON Web Token for Go to perform JWT verification and validation for API Authorization.

Run the example

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.

Documentation

This repository is documented and described in the Securing a Go API with JWTs article.

Contributing

Pull requests are welcome. To do so, just fork this repo, and submit a pull request.

License

The files and resources maintained in this repository are licensed under the Apache 2 license.

More Information

Please visit curity.io for more information about the Curity Identity Server.

Copyright (C) 2021 Curity AB.