Ap auto jwt#370
Open
ninjeeter wants to merge 5 commits into
Open
Conversation
Contributor
|
Images automagically compressed by Calibre's image-actions ✨ Compression reduced images by 75.9%, saving 873.0 KB.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new beginner-focused tutorial documenting how to build a Caido workflow that refreshes JWTs and stores tokens in environment variables for use via Replay placeholders (Issue #362).
Changes:
- Adds a new “Refresh a JWT” tutorial page with an end-to-end workflow script and Replay placeholder setup steps.
- Registers the new tutorial in the app tutorials sidebar navigation.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 19 comments.
| File | Description |
|---|---|
| src/app/tutorials/refresh_jwt.md | New tutorial page describing an active workflow that logs in, refreshes JWTs, and saves tokens to environment variables for Replay placeholders. |
| .vitepress/sidebars/app/tutorials.ts | Adds “Refresh a JWT” to the Tutorials sidebar under Workflows. |
|
|
||
| Typically, to continue authenticated testing in [Replay](/app/guides/replay_resending.md), the `accessToken` would need to be manually updated in the request headers. | ||
|
|
||
| However, by creating a [workflow](/app/guides/workflows_creating.html) that sets the `accessToken` and `refreshToken` as environment variables and automates the exchange, you can achieve continuous, uninterrupted testing in Replay requests using the [placeholder functionality](/app/guides/replay_environment_variables.md). |
| } | ||
| ``` | ||
|
|
||
| Once a minute has passed, a **401 Unauthorized** response is returned instead of user data with a body notifiying the `accessToken` has expired: |
| "username": "emilys", | ||
| "password": "emilyspass", | ||
| "birthDate": "1996-5-30", | ||
| "image": "https://dummyjson.com/ic on/emilys/128", |
Comment on lines
+73
to
+77
| "cardExpire": "05/28", | ||
| "cardNumber": "3693233511855044", | ||
| "cardType": "Diners Club International", | ||
| "currency": "GBP", | ||
| "iban": "GB74MH2UZLR9TRPHYNU8F8" |
| } | ||
| }, | ||
| "ein": "977-175", | ||
| "ssn": "900-590-289", |
| } | ||
| ``` | ||
|
|
||
| Once a minute has passed, a **401 Unauthorized** response is returned instead of user data with a body notifiying the `accessToken` has expired: |
| "username": "emilys", | ||
| "password": "emilyspass", | ||
| "birthDate": "1996-5-30", | ||
| "image": "https://dummyjson.com/ic on/emilys/128", |
Comment on lines
+73
to
+77
| "cardExpire": "05/28", | ||
| "cardNumber": "3693233511855044", | ||
| "cardType": "Diners Club International", | ||
| "currency": "GBP", | ||
| "iban": "GB74MH2UZLR9TRPHYNU8F8" |
| } | ||
| }, | ||
| "ein": "977-175", | ||
| "ssn": "900-590-289", |
Comment on lines
+420
to
+422
| To test the workflow: | ||
|
|
||
| 1. Send the following request via Replay: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #362