Skip to content

Ap auto jwt#370

Open
ninjeeter wants to merge 5 commits into
mainfrom
AP-Auto-JWT
Open

Ap auto jwt#370
ninjeeter wants to merge 5 commits into
mainfrom
AP-Auto-JWT

Conversation

@ninjeeter
Copy link
Copy Markdown
Contributor

Closes #362

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Images automagically compressed by Calibre's image-actions

Compression reduced images by 75.9%, saving 873.0 KB.

Filename Before After Improvement Visual comparison
src/_images/refresh_jwt_placeholder_settings.png 559.6 KB 148.1 KB 73.5% View diff
src/_images/refresh_jwt_placeholder.png 350.1 KB 94.7 KB 73.0% View diff
src/_images/refresh_jwt_environment.png 239.7 KB 33.7 KB 86.0% View diff

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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:
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.

Auto-refresh JWT tutorial

3 participants