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

feat: adds JWT for authenticating requests in test mode. #73

Merged
merged 15 commits into from
Mar 29, 2022
Merged

Conversation

re-Tick
Copy link
Contributor

@re-Tick re-Tick commented Mar 24, 2022

No description provided.

@re-Tick
Copy link
Contributor Author

re-Tick commented Mar 24, 2022

It adds middleware for Echo, Chi and Gin router. It makes changes in the go-chi/jwtauth.

In future, looking forward to add gin-jwt, echo jwt middleware when the underlying jwt package have a validationOption for mocking time in Claim Validation.
Referring to this feature request :golang-jwt/jwt#16

Copy link
Member

@slayerjain slayerjain left a comment

Choose a reason for hiding this comment

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

LGTM

@slayerjain slayerjain merged commit 0c730ac into main Mar 29, 2022
re-Tick added a commit that referenced this pull request Aug 18, 2022
* feat:add jwtauth middleware for mocking time in test

* fix(jwtauth): add condition for avoiding mock clock in record mode

* refactor(jwtauth): use keploy getclock in jwtauth instead of request context

* fixes nil pointer of keploy instance in jwtAuth to prevent panic

* feat(jwt): adds kjwtauth middleware for jwt authentication

authenticates the requests in test mode by mocking the time using WithClock jwt.ValidationOption

* Update README.md

* Update chi-v5.go

* Update chi-v5.go

* Update chi-v5.go

* Update context.go

* Update context.go

* Update README.md

* Update README.md

* feat(jwt): adds kjwtauth middleware for jwt authentication

authenticates the requests in test mode by mocking the time using WithClock jwt.ValidationOption

Co-authored-by: Sarthak160 <[email protected]>
Signed-off-by: re-Tick <[email protected]>
re-Tick added a commit that referenced this pull request Aug 25, 2022
* feat:add jwtauth middleware for mocking time in test

* fix(jwtauth): add condition for avoiding mock clock in record mode

* refactor(jwtauth): use keploy getclock in jwtauth instead of request context

* fixes nil pointer of keploy instance in jwtAuth to prevent panic

* feat(jwt): adds kjwtauth middleware for jwt authentication

authenticates the requests in test mode by mocking the time using WithClock jwt.ValidationOption

* Update README.md

* Update chi-v5.go

* Update chi-v5.go

* Update chi-v5.go

* Update context.go

* Update context.go

* Update README.md

* Update README.md

* feat(jwt): adds kjwtauth middleware for jwt authentication

authenticates the requests in test mode by mocking the time using WithClock jwt.ValidationOption

Co-authored-by: Sarthak160 <[email protected]>
Signed-off-by: re-Tick <[email protected]>
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