From 4e5a7fd5c268b6b038557cece6e50a03b8eda5f1 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Tue, 5 Dec 2023 13:36:22 -0500 Subject: [PATCH] README --- README.md | 11 +++++++++++ _example/main.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dadd01..c6e2c9d 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,17 @@ func router() http.Handler { } ``` +# Util + +See https://github.com/goware/jwtutil for utility to help you generate JWT tokens. + +`go install github.com/goware/jwtutil` + +Usage: `jwtutil -secret=secret -encode -claims='{"user_id":111}'` + +Output: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxMTF9._cLJn0xFS0Mdr_4L_8XF8-8tv7bHyOQJXyWaNsSqlEs` + + # LICENSE [MIT](/LICENSE) diff --git a/_example/main.go b/_example/main.go index 8f07eb5..a6d7559 100644 --- a/_example/main.go +++ b/_example/main.go @@ -65,7 +65,7 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/jwtauth/v5" - "github.com/lestrrat-go/jwx/jwt" + "github.com/lestrrat-go/jwx/v2/jwt" ) var tokenAuth *jwtauth.JWTAuth