-
Notifications
You must be signed in to change notification settings - Fork 210
add a migration guide #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // WithValidateToken sets up the function to be used to validate all tokens. | ||
| // See the ValidateToken type for more information. | ||
| // Default: TODO: after merge into `v2` | ||
| func WithValidateToken(vt ValidateToken) Option { | ||
| return func(m *JWTMiddleware) { | ||
| m.validateToken = vt | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed as the first parameter to New is ValidateToken.
Codecov Report
@@ Coverage Diff @@
## v2 #99 +/- ##
=====================================
Coverage ? 86.51%
=====================================
Files ? 3
Lines ? 178
Branches ? 0
=====================================
Hits ? 154
Misses ? 19
Partials ? 5 Continue to review full report at Codecov.
|
Signed-off-by: Jon Carl <[email protected]>
| If you are moving from v1 to v2 this is the place for you. | ||
|
|
||
| ### `jwtmiddleware.Options` | ||
| Now handled by individual [jwtmiddleware.Option](https://pkg.go.dev/github.com/auth0/go-jwt-middleware#Option) items. They can be passed to [jwtmiddleware.New](https://pkg.go.dev/github.com/auth0/go-jwt-middleware#New) after the [jwtmiddleware.ValidateToken](https://pkg.go.dev/github.com/auth0/go-jwt-middleware#ValidateToken) input: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these links will not work until v2 is released.
Signed-off-by: Jon Carl <[email protected]>
dd27882 to
d67ba56
Compare
In prep for
v2this PR adds a migration guide explaining the differences when moving fromv1tov2.