Skip to content

Commit

Permalink
chore: creating a new StaticSecret in jwt example expects an Algorith…
Browse files Browse the repository at this point in the history
…m instead of a Method
  • Loading branch information
ChoffaH authored and shaj13 committed Mar 9, 2021
1 parent 751bf61 commit b4ee370
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions _examples/jwt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"net/http"
"time"

gojwt "github.com/dgrijalva/jwt-go/v4"
"github.com/gorilla/mux"
"github.com/shaj13/libcache"
_ "github.com/shaj13/libcache/fifo"
Expand Down Expand Up @@ -60,9 +59,9 @@ func getBookAuthor(w http.ResponseWriter, r *http.Request) {

func setupGoGuardian() {
keeper = jwt.StaticSecret{
ID: "secret-id",
Secret: []byte("secret"),
Method: gojwt.SigningMethodHS256,
ID: "secret-id",
Secret: []byte("secret"),
Algorithm: jwt.HS256,
}
cache := libcache.FIFO.New(0)
cache.SetTTL(time.Minute * 5)
Expand Down

0 comments on commit b4ee370

Please sign in to comment.