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

feature: Use RegisteredClaims instead of deprecated staruct StandardClaims #16206

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

wujunwei
Copy link
Contributor

StandardClaims are Deprecated and may might lead to incompatibilities with other JWT implementations. The use of this is discouraged.
Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct.
Signed-off-by: wujunwei [email protected]

@zyyw zyyw self-requested a review January 17, 2022 08:33
@zyyw zyyw self-assigned this Jan 17, 2022
@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Apr 17, 2022
Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@wy65701436 wy65701436 added release-note/update Update or Fix and removed Stale labels May 9, 2022
@wy65701436 wy65701436 closed this May 9, 2022
@wy65701436 wy65701436 reopened this May 9, 2022
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #16206 (5a42ac1) into main (c2a9f5d) will decrease coverage by 0.04%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16206      +/-   ##
==========================================
- Coverage   67.16%   67.12%   -0.05%     
==========================================
  Files         979      979              
  Lines       81776    81778       +2     
  Branches     2604     2604              
==========================================
- Hits        54922    54890      -32     
- Misses      23103    23137      +34     
  Partials     3751     3751              
Flag Coverage Δ
unittests 67.12% <90.90%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pkg/token/claims/v2/claims.go 66.66% <66.66%> (+6.66%) ⬆️
src/core/service/token/authutils.go 75.67% <100.00%> (ø)
src/pkg/token/claims/robot/robot.go 81.81% <100.00%> (+1.81%) ⬆️
src/controller/event/handler/auditlog/auditlog.go 8.69% <0.00%> (-52.18%) ⬇️
src/lib/cache/helper.go 73.91% <0.00%> (-8.70%) ⬇️
src/controller/event/topic.go 1.80% <0.00%> (-7.21%) ⬇️
src/common/utils/passports.go 84.61% <0.00%> (-5.13%) ⬇️
...es/vulnerability/vulnerability-config.component.ts 54.07% <0.00%> (-4.45%) ⬇️
src/jobservice/worker/cworker/c_worker.go 66.50% <0.00%> (-1.92%) ⬇️

@wy65701436
Copy link
Contributor

@wujunwei could you help to fix the CI failure? Then, I'll merge it.

@zyyw
Copy link
Contributor

zyyw commented May 9, 2022

@wujunwei Thanks for contributing to Harbor. Could you please rebase the latest main branch into your branch and then force push your branch to this PR?

@wujunwei wujunwei requested a review from a team as a code owner May 10, 2022 07:52
@wujunwei
Copy link
Contributor Author

@wujunwei Thanks for contributing to Harbor. Could you please rebase the latest main branch into your branch and then force push your branch to this PR?

I had do that , anything thing I should do ?

@zyyw
Copy link
Contributor

zyyw commented May 26, 2022

@wujunwei Thanks for your contribution! Could you please rebase latest main branch into your branch again and squash your commits into one. Thanks.

@MinerYang
Copy link
Contributor

MinerYang commented May 26, 2022

Hi @wujunwei ,

Apologize for reaching you late until now and would you like to keep working on this PR?
We would like you to squash the commits into one, thx.

Best,
Miner

@wujunwei
Copy link
Contributor Author

@MinerYang @zyyw I have squashed my commits into one and force push to this branch , did I do it right?

@wujunwei
Copy link
Contributor Author

It seems that the CI / APITEST_DB ‘s failure has nothing to do with these commits ?

@MinerYang
Copy link
Contributor

It seems that the CI / APITEST_DB ‘s failure has nothing to do with these commits ?

It failed at notary sign image test and probably due to the token reason. I would look into this first and hold this PR until it's not a broken change.
Thanks for your contribution and let's keep in touch!

Best,
Miner

@wujunwei
Copy link
Contributor Author

It seems that the CI / APITEST_DB ‘s failure has nothing to do with these commits ?

It failed at notary sign image test and probably due to the token reason. I would look into this first and hold this PR until it's not a broken change. Thanks for your contribution and let's keep in touch!

Best, Miner

I have found why CI / APITEST_DB failed ,and I try to fix it. please have a look. @MinerYang

@wujunwei
Copy link
Contributor Author

wujunwei commented Jun 16, 2022

@wujunwei could you help to fix the CI failure? Then, I'll merge it.

I have fixed all the CI failure @wy65701436 : )

Copy link
Contributor

@MinerYang MinerYang left a comment

Choose a reason for hiding this comment

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

lgtm

@MinerYang MinerYang merged commit bf741ad into goharbor:main Aug 1, 2022
sluetze pushed a commit to sluetze/harbor that referenced this pull request Oct 29, 2022
mcsage pushed a commit to mcsage/harbor that referenced this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/update Update or Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants