Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

fixed JWT Auth to have Expires and renew when Mojo renews#6745

Merged
srijeet0406 merged 1 commit intoapache:masterfrom
mattjackson220:jwtAuthFix
Apr 20, 2022
Merged

fixed JWT Auth to have Expires and renew when Mojo renews#6745
srijeet0406 merged 1 commit intoapache:masterfrom
mattjackson220:jwtAuthFix

Conversation

@mattjackson220
Copy link
Contributor

This PR updates the JWT Auth to include the Expires field and to renew the token when the mojolicious cookie is renewed


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

Login to Traffic Ops and verify that you get a mojolicious cookie and an access_token cookie.
Hit a non-login endpoint and verify that both cookies are refreshed.
Verify that the access_token has the Expired field
Verify that login works as expected using user/pass, mojo cookie, and JWT

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@mattjackson220 mattjackson220 added bug something isn't working as intended Traffic Ops related to Traffic Ops authentication Relating to login, registration, passwords, tokens, etc. labels Apr 12, 2022
Copy link
Contributor

@srijeet0406 srijeet0406 left a comment

Choose a reason for hiding this comment

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

Code looks good.
Unit tests and API tests pass.
Manually tested and verified that the access token's expiry was set to the correct value.

@srijeet0406 srijeet0406 merged commit 141ec3c into apache:master Apr 20, 2022
zrhoffman pushed a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

authentication Relating to login, registration, passwords, tokens, etc. bug something isn't working as intended Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants