go-chi / jwtauth

JWT authentication middleware for Go HTTP services
MIT License
550 stars 91 forks source link

Remove unnecessary code and clean up errors #30

Closed ernsheong closed 6 years ago

ernsheong commented 6 years ago

I'm sure there are implications and breaking changes, just starting out the process with a PR.

Attempts to fix following: Fixes https://github.com/go-chi/jwtauth/issues/29 Fixes https://github.com/go-chi/jwtauth/issues/28

ernsheong commented 6 years ago

I suppose that is the only way to merge this PR, if at all.

I was trying to address #28 and #29. I recognize that it's not always desirable for sake of compatibility. I'll just open the discussion for now.

It does mean that the user will have to use jwt.MapClaims as their default (and only) claim type.

In my fork I am trying to make it possible to customize claim verification without having to replace with your own Verifier. But that is for another PR.

pkieltyka commented 6 years ago

thank you for this PR. I like it, will work it towards v4.0.0