Skip to content

Conversation

TerryW-tx
Copy link
Contributor

@TerryW-tx TerryW-tx commented Jan 28, 2024

Implement the JWT feature for example. I'm not sure whether it will work since I'm not clear how the test cases will realize their authentication. If this code is a feasible implementation, I'll add other authentication functions later. Please give me some advice, thx.

mod: since this auth feature is not only feasible to JWT, rename it to token authentication.

}

func (rt *JwtRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
req.Header.Set("Authorization", rt.Token)
Copy link
Member

Choose a reason for hiding this comment

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

according implementation, there is nothing about jwt.
so please change to another class name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your comments. JwtAuth is already renamed to tokenAuth.

@TerryW-tx TerryW-tx changed the title feat: implement JWT-based test authentication feat: implement Token-based test authentication Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (72e8ce0) 100.00% compared to head (0578729) 96.82%.
Report is 12 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #36      +/-   ##
===========================================
- Coverage   100.00%   96.82%   -3.18%     
===========================================
  Files            1        3       +2     
  Lines           51       63      +12     
===========================================
+ Hits            51       61      +10     
- Misses           0        2       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit 1648a42 into goplus:main Jan 30, 2024
@TerryW-tx TerryW-tx deleted the auth branch January 30, 2024 12:40
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.

2 participants