Skip to content
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

add a migration guide #99

Merged
merged 2 commits into from
Jul 19, 2021
Merged

add a migration guide #99

merged 2 commits into from
Jul 19, 2021

Conversation

grounded042
Copy link
Contributor

In prep for v2 this PR adds a migration guide explaining the differences when moving from v1 to v2.

@grounded042 grounded042 requested a review from a team as a code owner July 16, 2021 21:28
Comment on lines -78 to -87
// 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
}
}

Copy link
Contributor Author

@grounded042 grounded042 Jul 16, 2021

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-commenter
Copy link

codecov-commenter commented Jul 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (v2@b4ac45b). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4ac45b...d67ba56. Read the comment docs.

Signed-off-by: Jon Carl <jon.carl@auth0.com>
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:
Copy link
Contributor Author

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 <jon.carl@auth0.com>
@grounded042 grounded042 mentioned this pull request Jul 16, 2021
21 tasks
@grounded042 grounded042 merged commit 6401fcf into v2 Jul 19, 2021
@grounded042 grounded042 deleted the migration-guide branch July 19, 2021 13:58
sergiught pushed a commit that referenced this pull request Nov 1, 2021
d10i pushed a commit to Hikely/go-jwt-middleware that referenced this pull request Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants