ant0ine / go-json-rest

A quick and easy way to setup a RESTful JSON API
https://ant0ine.github.io/go-json-rest/
MIT License
3.52k stars 382 forks source link

JWT middleware seems dead... #204

Open hyacinthus opened 7 years ago

hyacinthus commented 7 years ago

The author no longer maintains it.

Hentioe commented 7 years ago

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 的样子。 不过,你应该早就解决了吧。

hyacinthus commented 7 years ago

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

PhanHaHus commented 7 years ago

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

hyacinthus commented 7 years ago

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

PhanHaHus commented 7 years ago

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

hyacinthus commented 7 years ago

@PhanHaHus Echo has a cookbook too.