Closed mkvy closed 1 year ago
https://github.com/shaj13/go-guardian/blob/master/_examples/jwt/main.go example here contains come code with deprecated RegisterOnExpired method:
func setupGoGuardian() { keeper = jwt.StaticSecret{ ID: "secret-id", Secret: []byte("secret"), Algorithm: jwt.HS256, } cache := libcache.FIFO.New(0) cache.SetTTL(time.Minute * 5) cache.RegisterOnExpired(func(key, _ interface{}) { cache.Peek(key) }) basicStrategy := basic.NewCached(validateUser, cache) jwtStrategy := jwt.New(cache, keeper) strategy = union.New(jwtStrategy, basicStrategy) }
Causes panic: RegisterOnExpired no longer available
https://github.com/shaj13/go-guardian/blob/master/_examples/jwt/main.go example here contains come code with deprecated RegisterOnExpired method:
Causes panic: RegisterOnExpired no longer available