Skip to content

eryk-vieira/go-cognito-jwt-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Simple Go library that validates AWS cognito JWT token


🏗️ Installation

  # Add to your go project using:
  go get github.com/eryk-vieira/go-cognito-jwt-validator

🧑‍💻 Usage

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)
  }
}

📕 License

Released in 2022. This project is under the MIT license 🚀

Made with love by Eryk 🚀

About

A simple library that validates a cognito JWT token

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages