A Simple Go library that validates AWS cognito JWT token
# Add to your go project using:
go get github.com/eryk-vieira/go-cognito-jwt-validator
package main
import (
validator "github.com/eryk-vieira/go-cognito-jwt-validator"
)
func main(){
// Change the config with your valid credentials
validator := validator.New(&validator.Config{
Region: "AWS Cognito Region",
CognitoPoolId: "Cognito Pool Id",
CognitoClientId: "Cognito Client Id",
})
err := validator.Validate("JWT Token")
// if err != nil your Token is invalid, expired or don't follow any of yout public keys signature
if err != nil {
fmt.Println(err)
}
}
Released in 2022. This project is under the MIT license 🚀
Made with love by Eryk 🚀