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

Add refresh endpoint for JWT tokens #2570

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Feb 6, 2023

Based on #2569

Adds an endpoint that accepts valid and active refresh tokens. The endpoint will then make a new refresh token and access token that is given to the user. This way the refresh token is only used once, limiting the risk of leaking.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

Test results

     12 files       12 suites   11m 45s ⏱️
3 303 tests 3 303 ✔️ 0 💤 0
9 384 runs  9 384 ✔️ 0 💤 0

Results for commit 35737f8.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Feb 6, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e879e67) 55.19% compared to head (35737f8) 55.69%.
Report is 163 commits behind head on master.

Files Patch % Lines
python/nav/models/api.py 97.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2570      +/-   ##
==========================================
+ Coverage   55.19%   55.69%   +0.49%     
==========================================
  Files         561      567       +6     
  Lines       40917    41286     +369     
==========================================
+ Hits        22584    22993     +409     
+ Misses      18333    18293      -40     

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

@stveit stveit self-assigned this Feb 8, 2023
@stveit stveit marked this pull request as draft February 8, 2023 07:55
@stveit stveit force-pushed the jwt-refresh-endpoint branch from a81bb92 to f4b78a5 Compare November 13, 2023 10:15
"data" and "body" were both used for the same thing, so
changed to only use one of the terms for clarity
@stveit stveit force-pushed the jwt-refresh-endpoint branch from f4b78a5 to 67d742d Compare November 13, 2023 10:23
dupe fixtures from the model tests. need to find  good way to share
the fixtures between integration/unittests or
maybe not mock here and have an actual testing config file instead
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

1 participant