go-chi / jwtauth

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

add WithParseOption() to create jwtauth with custom parse options #68

Open msvechla opened 2 years ago

msvechla commented 2 years ago

Hello,

This PR adds the new function WithParseOption(), which allows specifying custom parse options for JWTAuth. This enables specifying custom options such as jwt.WithKeySetProvider, which allows us to use JWKS and more sophisticated validation logic.

See also related #59, #40, #27. We should be able to resolve most of the mentioned issues here with these custom options.

Thanks a lot, let me know if you have any further feedback!

msvechla commented 2 years ago

We could also consider allowing to specify multiple parse-options

msvechla commented 2 years ago

@pkieltyka any thoughts on this?