go-json-rest icon indicating copy to clipboard operation
go-json-rest copied to clipboard

JWT middleware seems dead...

Open hyacinthus opened this issue 8 years ago • 6 comments

The author no longer maintains it.

hyacinthus avatar Feb 08 '17 09:02 hyacinthus

No, it's not dead. Only go-json-rest-middleware-jwt-dependent jwt-go versions are upgraded to 3.x and are no longer compatible with the 2.x API. But the middleware is still using the 2.x API. Add in your glide.yaml:

- package: github.com/dgrijalva/jwt-go
  version: v2.7.0

Run the command:

glide up

And then delete the vendor/StephanDollberg/go-json-rest-middleware-jwt/vendor directory. —————— 简而言之,要么降低 jwt-go 版本到 2.x 要么 fork 中间件修改成兼容 3.x 的样子。 不过,你应该早就解决了吧。

Hentioe avatar Apr 10 '17 07:04 Hentioe

@Hentioe Yes, thank you, I've forked it and merge it to use jwt-go 3.x.

hyacinthus avatar Apr 10 '17 07:04 hyacinthus

Do you have custom middleware before access API, example of author I cant custom , :(

PhanHaHus avatar Apr 24 '17 03:04 PhanHaHus

@PhanHaHus I use Echo in my new projects now... It's much better than go-json-rest :)

hyacinthus avatar Apr 24 '17 06:04 hyacinthus

@hyacinthus yeah, but Im newbie with golang, and I dont know how to struct project with echo, because go-json-rest have more example :(

PhanHaHus avatar Apr 24 '17 07:04 PhanHaHus

@PhanHaHus Echo has a cookbook too.

hyacinthus avatar Apr 24 '17 07:04 hyacinthus