Skip to content

Conversation

@jfatta
Copy link

@jfatta jfatta commented Apr 30, 2021

fix #62

I'll keep it as draft until tests are working on v2 branch.

@jfatta jfatta changed the base branch from master to v2 April 30, 2021 18:06
@jfatta jfatta force-pushed the v2-fix-clone-request branch from 2bfab37 to 3e76a58 Compare May 21, 2021 18:49
@jfatta jfatta marked this pull request as ready for review May 21, 2021 18:50
@jfatta jfatta requested a review from a team as a code owner May 21, 2021 18:50
Copy link
Contributor

@grounded042 grounded042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

jwtmiddleware.go Outdated
// no err means we have a valid token, so set it into the
// context and continue onto next
*r = *r.Clone(context.WithValue(r.Context(), ContextKey{}, validToken))
r = r.Clone(context.WithValue(r.Context(), ContextKey{}, validToken))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, good catch on this

@jfatta jfatta merged commit 23c6193 into v2 May 21, 2021
@jfatta jfatta deleted the v2-fix-clone-request branch May 21, 2021 19:22
sergiught pushed a commit that referenced this pull request Nov 1, 2021
* fix: clone request with ctx

* fix unnecessary pointer
d10i pushed a commit to Hikely/go-jwt-middleware that referenced this pull request Nov 2, 2021
* fix: clone request with ctx

* fix unnecessary pointer
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.

CheckJWT should use net/http.Request.Clone

3 participants