Skip to content

timwea/gocog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocog

gocog is a simple Go library for validating Amazon Cognito JWTs. It supports both access and identity token validation and uses only the standard library.

Installation

$ go get github.com/timwea/gocog

Basic Usage

package main

import (
    "log"
    "github.com/timwea/gocog"
)

func main() {

    validator := gocog.NewCognitoJwtValidator("<userPoolId>", "<clientId>")

    err := validator.Validate("<token>")	
    if err != nil {
	log.Fatal(err)
    }

}