Skip to content

feat: DIA-2201: Add endpoint to rotate personal access token #7435

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

Merged
merged 12 commits into from
Apr 29, 2025

Conversation

hakan458
Copy link
Collaborator

@hakan458 hakan458 commented Apr 28, 2025

This PR was automatically generated via Follow Merge. Workflow Run
Please ensure that all linked upstream Pull Requests are merged before proceeding with this one.

Adding a new API endpoint to rotate a personal access token (JWT). Previously you could not use a JWT to rotate the token. Either had to use UI, or legacy token to do it manually. Now with one request you can use your personal access token to blacklist the existing token, and get a new one.

curl -X POST <label studio URL>/api/token/rotate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your access token>" \
-d '{"refresh": "<your refresh token to rotate>"}'

Returns new refresh token

{"refresh": <new refresh token>}

@github-actions github-actions bot added the feat label Apr 28, 2025
Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 5a20b99
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/681120e7fcf80700084d5d02
😎 Deploy Preview https://deploy-preview-7435--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 5a20b99
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/681120e7f7f1590008026826
😎 Deploy Preview https://deploy-preview-7435--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for label-studio-storybook canceled.

Name Link
🔨 Latest commit 5a20b99
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-storybook/deploys/681120e7c96a3500089a4771

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.55%. Comparing base (ec3c97f) to head (5a20b99).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
label_studio/jwt_auth/views.py 85.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7435      +/-   ##
===========================================
+ Coverage    78.53%   78.55%   +0.02%     
===========================================
  Files          195      195              
  Lines        15767    15800      +33     
===========================================
+ Hits         12382    12412      +30     
- Misses        3385     3388       +3     
Flag Coverage Δ
pytests 78.55% <90.90%> (+0.02%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@robot-ci-heartex robot-ci-heartex enabled auto-merge (squash) April 29, 2025 17:16
@hakan458
Copy link
Collaborator Author

hakan458 commented Apr 29, 2025

/fm sync

Workflow run

@robot-ci-heartex robot-ci-heartex merged commit 2a3d4ac into develop Apr 29, 2025
51 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-dia-2201 branch April 29, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants