JWT Authentication with AWS Cognito in Go + Gin Middleware
import "github.com/hiepd/cognito-go"
c, _ := cognito.NewCognito("ap-southeast-2", "cognito-app", "xxx")
token, err := c.VerifyToken("abc")
import (
"github.com/hiepd/cognito-go"
"github.com/gin-gonic/gin"
)
c, _ := cognito.NewCognito("ap-southeast-2", "cognito-app", "xxx")
r := gin.New()
r.GET("/protected", c.Authorize(), protectedEndpoint)